Forum Discussion
DAX cumulative date AND location, second filter isn't working
- Anonymous4 years ago
Hi IAM ,
Please update the formula of measure [Cumulative] as below and check whether that can return the correct result...
Cumulative =
CALCULATE (
SUM ( 'Calculate1'[NewWorkorders] ),
FILTER (
ALL ( 'Calculate1' ),
'Calculate1'[First day] <= EARLIER ( 'Calculate1'[First day] )
&& 'Calculate1'[Terminal] = EARLIER ( Calculate1[Terminal] )
)
)
- CALCULATE (
SUM ( 'Calculate1'[closedWorkorders] ),
FILTER (
ALL ( 'Calculate1' ),
'Calculate1'[First day] <= EARLIER ( 'Calculate1'[First day] )
&& 'Calculate1'[Terminal] = EARLIER ( Calculate1[Terminal] )
)
)If the above one can't help you get the desired result, please provide some sample data in Calculate1 table (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
How to upload PBI in Community
Best Regards
Sadly I cannot share this..
The problem is the red part of the formula. It isn't using this part of the filter.
It should filter out only the terminal as the name of the terminal that is on that row.
Hi IAM ,
Please update the formula of measure [Cumulative] as below and check whether that can return the correct result...
| Cumulative = CALCULATE ( SUM ( 'Calculate1'[NewWorkorders] ), FILTER ( ALL ( 'Calculate1' ), 'Calculate1'[First day] <= EARLIER ( 'Calculate1'[First day] ) && 'Calculate1'[Terminal] = EARLIER ( Calculate1[Terminal] ) ) ) - CALCULATE ( SUM ( 'Calculate1'[closedWorkorders] ), FILTER ( ALL ( 'Calculate1' ), 'Calculate1'[First day] <= EARLIER ( 'Calculate1'[First day] ) && 'Calculate1'[Terminal] = EARLIER ( Calculate1[Terminal] ) ) ) |
If the above one can't help you get the desired result, please provide some sample data in Calculate1 table (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
How to upload PBI in Community
Best Regards