Forum Discussion
Cumulative Cost Measure - Line Graph Stop Flat Lining Out
It seems like you want to adjust your DAX measure to ensure that the 'Earned' line stops at the current reporting month and the 'To Go' line starts projecting from the reporting month onwards. You can achieve this by modifying your DAX measure to consider the current reporting month.
Here's how you can adjust your DAX measure:
Cumulative Cost =
VAR CurrentMonth = MAX('EV Data Pivot'[Month])
RETURN
CALCULATE(
SUM('EV Data Pivot'[Month Value]),
FILTER(
ALLSELECTED('EV Data Pivot'),
'EV Data Pivot'[Month] <= CurrentMonth
),
VALUES('EV Data Pivot'[Control Account]),
VALUES('EV Data Pivot'[Cost Type])
)
In this modified DAX measure, we define a variable CurrentMonth which holds the maximum month value in the 'EV Data Pivot' table. Then, we use this variable in the FILTER function to ensure that the calculation is performed only up to the current reporting month.
This adjustment should make the 'Earned' line stop at the current reporting month, as desired. Similarly, the 'To Go' line should start projecting from the reporting month onwards.
Make sure to replace 'EV Data Pivot'[Month] with your actual date column if it has a different name in your dataset. Also, ensure that your date table relationship is properly configured to align with your financial year reporting.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.