Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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.

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

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.