Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Summing based on a date parameter in Power BI Report Builder

@ links to members, content

 

I have a report in Power BI Report Builder.  I created a matrix with a date parameter.  My totals in my matrix are not correct, I cannot get the total field to acknowledge the date range of the parameter.   See Below.

Example- first row should show a total of 70 not 2730.   It appears it is not considering the date parameter and is giving all the hours for an employee regards to the date parameter. This is the expression I am trying to use for this total column:

 

=Sum(IIF(Fields!WorkDate.Value >= Parameters!ID_StartDate.Value AND Fields!WorkDate.Value <=Parameters!ID_EndDate.Value,Fields!WorkHours.Value,0))

 

Any help would be greatly appreciated!