cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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:

image.png

 

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

image.png

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

 

1 ACCEPTED SOLUTION
Icey
Community Support
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] )
    )
)

cummulative.PNG

 

 

Best Regards,

Icey

 

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

View solution in original post

3 REPLIES 3
Icey
Community Support
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] )
    )
)

cummulative.PNG

 

 

Best Regards,

Icey

 

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

View solution in original post

Anonymous
Not applicable

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

amitchandak
Super User
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

 

Refer step at: https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-1-Time-Intelligence-in/ba-p/922885

 

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
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!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.