Forum Discussion
Kate_24
3 years agoRegular Visitor
Running total for a specific period
Dear all, I am new user of Power Bi and I am not good at DAX. I created a quick measure "Running total" in order to display the cumulative sales across months. The available data are until J...
- 3 years ago
Hi, Kate_24
You can try the following methods.
Measure:
Cumulative = Var _Sum=CALCULATE(SUM('Table 1'[Sales]),FILTER(ALL('Table 2'),[Month_U]<=SELECTEDVALUE('Table 2'[Month_U]))) Var _Maxmonth=CALCULATE(MAX('Table 1'[Month]),ALL('Table 1')) Return IF(SELECTEDVALUE('Table 2'[Month_U])>_Maxmonth,BLANK(),_Sum)Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- 3 years ago
Hi,
Please find attached the solution file.
Hope this helps.
Kate_24
3 years agoRegular Visitor
Thanks s lot! It worked!