Forum Discussion
Cumulative Count DAX
- Anonymous1 year ago
Hi NessFlood ,
You can try the following DAX: Change ALL() to ALLSELECTED(), which can adjust with the changes in the filter.
The ALLSELECTED function gets the context that represents all rows and columns in the query, while keeping explicit filters and contexts other than row and column filters. This function can be used to obtain visual totals in queries.
ALLSELECTED function (DAX) - DAX | Microsoft Learn
CumulativeCompleteCount_Measure = COUNTX( FILTER(ALLSELECTED('CBR_REPORT'), 'CBR_REPORT'[Build Complete FC Status]="Complete"&&'CBR_REPORT'[BLD110 Build Complete FC]<=MAX('CBR_REPORT'[BLD110 Build Complete FC])),[Ref ID])If dax gets results that don't match your expected results, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi NessFlood ,
You can try the following DAX: Change ALL() to ALLSELECTED(), which can adjust with the changes in the filter.
The ALLSELECTED function gets the context that represents all rows and columns in the query, while keeping explicit filters and contexts other than row and column filters. This function can be used to obtain visual totals in queries.
ALLSELECTED function (DAX) - DAX | Microsoft Learn
CumulativeCompleteCount_Measure =
COUNTX(
FILTER(ALLSELECTED('CBR_REPORT'),
'CBR_REPORT'[Build Complete FC Status]="Complete"&&'CBR_REPORT'[BLD110 Build Complete FC]<=MAX('CBR_REPORT'[BLD110 Build Complete FC])),[Ref ID])
If dax gets results that don't match your expected results, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- NessFlood1 year ago
Helper I
thank you - I changed to ALLSELECTED and realised that the visuals need to be drilled down also so I can see the full result 🙂