cancel
Showing results for
Did you mean:
Anonymous
Not applicable

## Cummulative total working for date measure but not for month measure

I have made a measure for the cummulative total of another measure using the following DAX formula:

Cummulative:= CALCULATE([Measure],DATESYTD('Date'[Date])

This gives the following result for a visual using the 'Date'[Date] collumn as the x-axis:

But if I try with the 'Date'[Month] collumn instead, I get a simple sum for each month:

How do I get the cummulative total for each month to work the same as the date?

1 ACCEPTED SOLUTION
Community Support

Hi @Anonymous ,

Try to create your Measure like so:

``````Cummulative 2 =
CALCULATE (
[Measure],
FILTER (
ALLSELECTED ( 'Date' ),
[Date].[Year] = YEAR ( MAX ( [Date] ) )
&& [Date] <= MAX ( [Date] )
)
)
``````

Best Regards,

Icey

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 REPLIES 3
Community Support

Hi @Anonymous ,

Try to create your Measure like so:

``````Cummulative 2 =
CALCULATE (
[Measure],
FILTER (
ALLSELECTED ( 'Date' ),
[Date].[Year] = YEAR ( MAX ( [Date] ) )
&& [Date] <= MAX ( [Date] )
)
)
``````

Best Regards,

Icey

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

This solution worked straight out of the box! Thank you very much! Kudos to you.

Super User

@Anonymous

Is the Date table is marked as a date table? This should work. Right click on date table you have an option

Dashboard of My Blogs !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

Announcements

#### Launching new user group features

Learn how to create your own user groups today!