Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi super users. I've got a cumulative total calculation that works as a measure, but when I try to use it (even modified), it isn't returning the correct values.
This measure is working.
Cumulative Revenue =
This is what I've tried using in the Calculation Group for Cumulative Revenue, but it just returns the total for the current day.
VAR MonthStart = DISTINCT ( SELECTCOLUMNS ( FILTER('Fiscal Calendar', 'Fiscal Calendar' [Calendar_Date] = Today()-1) , "Fiscal Calendar", [Month_Start_Date] )) RETURN CALCULATE (SUM('Collected Payments'[Amount]), --[Total Revenue], FILTER(ALLSELECTED('Collected Payments'), 'Collected Payments'[Invoice Closed Date] <= MAX('Collected Payments'[Invoice Closed Date])
Any help would be greatly appreciated. Thanks in advance!
Hi @lingleji
The variable MonthStart is not used in your measure, what is it created for?
For the cumulative total in calculation group, the solution in the following thread may be helpful. You could give it a try.
Calculation groups for cumulative total DAX Pattern - Microsoft Power BI Community
----------------------------------------------------------------------
If this reply helps solve the problem, please mark it as Solution! Kudos are appreciated too!
If you want the cumulative total to reset at the end of each year, you can use a year-to-date calculation:
Cumulative Revenue =
CALCULATE (
SUM ( 'Collected Payments'[Amount] ),
DATESYTD ( 'Fiscal Calendar'[Calendar_Date] )
)
Proud to be a Super User!
User | Count |
---|---|
141 | |
113 | |
104 | |
78 | |
64 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |