Power BI calculate DAX measure cumulatively
I can’t configure how to calculate DAX measure cumulatively. The DAX measure by it self looks like this:
UpdateTicket_ = CALCULATE(Logging[LogDistcount_], Logging[Step] = 7) # DAX measure to filter distinct ID by some condition.
LogDistcount_ = DISTINCTCOUNT(Logging[TicketId]) # DAX measure to calculate distinct ID presented in the featured dataset.
The ploblem is that formula construction to calculate cumulatively doesn’t allow to sum DAX measure. I mean this: =CALCULATE(SUM(UpdateTicket_)… The formula doesn’t give an option to select UpdateTicket_ to make a SUM of it. This measure doesn’t appear in the selection list of the SUM formula at all.
Currently output of the UpdateTicket_ measure looks like this:
What I am looking for:
Solution – 1
I hope you can accept the following solution:
Let Power BI create the measure for you by going to Quick measure – Running total
You’ll get the following expression:
UpdateTicket_Cumulatively = CALCULATE( SUM('Table'[UpdateTicket_]), FILTER( ALLSELECTED('Table'[StartTime_DateOnly]), ISONORAFTER('Table'[StartTime_DateOnly], MAX('Table'[StartTime_DateOnly]), DESC) )
and a table like this:
Note that this works with both measures and columns.