Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi! 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.
StartTime_DateOnly | UpdateTicket_ |
08.11.2022 | 950 |
09.11.2022 | 1056 |
10.11.2022 | 1056 |
11.11.2022 | 1056 |
12.11.2022 | 1056 |
13.11.2022 | 1056 |
What I am looking for:
StartTime_DateOnly | UpdateTicket_ | UpdateTicket_Cumulatively |
08.11.2022 | 950 | 950 |
09.11.2022 | 1056 | 2006 |
10.11.2022 | 1056 | 3062 |
11.11.2022 | 1056 | 4118 |
12.11.2022 | 1056 | 5174 |
13.11.2022 | 1056 | 6230 |
Solved! Go to Solution.
Hi, @bombom
According to your description, you want to calculate the cumulatively value of a measure . Right?
Here are the steps you can refer to :
(1)This is my test data:
I create a measure like this:
UpdateTicket_ = SUM('Table'[UpdateTicket])
(2)Then we can click "New Measure" to create a measure like this:
Mul Value = var _t =SUMMARIZE( ALLSELECTED('Table') ,'Table'[StartTime_DateOnly] , "UpdateTicket" , [UpdateTicket_])
var _curdate = MAX('Table'[StartTime_DateOnly])
var _mul_table = FILTER( _t , [StartTime_DateOnly] <= _curdate)
return
SUMX(_mul_table , [UpdateTicket_])
(3)Then we can put this on the visual and we can meet your need , the result is as follows:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi, @bombom
According to your description, you want to calculate the cumulatively value of a measure . Right?
Here are the steps you can refer to :
(1)This is my test data:
I create a measure like this:
UpdateTicket_ = SUM('Table'[UpdateTicket])
(2)Then we can click "New Measure" to create a measure like this:
Mul Value = var _t =SUMMARIZE( ALLSELECTED('Table') ,'Table'[StartTime_DateOnly] , "UpdateTicket" , [UpdateTicket_])
var _curdate = MAX('Table'[StartTime_DateOnly])
var _mul_table = FILTER( _t , [StartTime_DateOnly] <= _curdate)
return
SUMX(_mul_table , [UpdateTicket_])
(3)Then we can put this on the visual and we can meet your need , the result is as follows:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
try this
User | Count |
---|---|
101 | |
90 | |
80 | |
71 | |
70 |
User | Count |
---|---|
114 | |
98 | |
97 | |
73 | |
72 |