I have a SQL dataset with the fields "activityDate" of data type 'Date' and 'activityHours' of data type 'Float'.
The following formula correctly retrieves the number of records for March 1, 2021
CountRows( Filter( '[dbo].[tmtrak_dev_records]', submittedBy = userEmail, activityDate = Date(2021, 3, 1) ) )
However, the following formula returns a blank value when retrieving the Sum of "activityHours" of records for March 1, 2021
Sum( Filter( '[dbo].[tmtrak_dev_records]', submittedBy = userEmail, activityDate = Date(2021, 3, 1) ), activityHours )
When 'activityDate' is removed from the second Filter, the formula correctly retrieves the Sum of "activityHours" for all user records in my dataset.
I went through the documentation several times, but it's unclear to me why "activityDate" can be used in the first formula example, but not the second.
Solved! Go to Solution.
Thanks, this actually solved my problem! However, I do receive a Delegation warning now.
My database will have well over 2000 records, so this may be a new issue...
EDIT: activityHours has data type 'Float'
Hello @alex93jansen ,
Thank you for confirming. If this addresses your ask, please mark mahoneypat's response as a solution.
for your delegation part, you can use variables or collections to work on this. You can get some suggestions from Forum within too.
Article to refer: Understand delegation in a canvas app - Power Apps | Microsoft Docs
One question about delegation. The formula below throws a delegation warning due to the VALUE-function. However, will this pertain to the entire dataset size (well over 2000) or the result of FILTER (will never exceed 10)?
Sum( Filter( '[dbo].[tmtrak_dev_records]', submittedBy = userEmail, activityDate = Date(2021, 3, 1) ), VALUE(activityHours) )
Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.
Did you miss the call?? Check out the Power Apps Community Call here!
ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.