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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
JakobH
Frequent Visitor

Binning dates in cumulative total measure

Hello

I have a "Cumulative Total" measure. I want to create a table/graph where cumulative amounts are displayed against months

Simply binning the dates does not work. Then only the sum for the specific months are displayed instead of the cumulative amount.

Any tips on how i can show the cumulative total against months?

 

Cumulative Total = 
CALCULATE(SUM(Fact[Amount]),
    FILTER(ALL(Fact[Date]),
        Fact[Date] <= MAX(Fact[Date])
        )
    )

 

1 ACCEPTED SOLUTION
Alf94
Super User
Super User

Hi @JakobH,

 

If you are looking for a cumulative total that starts again every year you can try the following:

 

Cumulative total =
    CALCULATE(
        SUM( Fact[Amount] ),
        DATESYTD( Calendar[Date] )
    )

 

where Calendar is a table containing all your dates.

 

If I answered your question, please mark my post as a solution.

Best,

View solution in original post

2 REPLIES 2
Alf94
Super User
Super User

Hi @JakobH,

 

If you are looking for a cumulative total that starts again every year you can try the following:

 

Cumulative total =
    CALCULATE(
        SUM( Fact[Amount] ),
        DATESYTD( Calendar[Date] )
    )

 

where Calendar is a table containing all your dates.

 

If I answered your question, please mark my post as a solution.

Best,

JakobH
Frequent Visitor

Thanks for the reply, but what i wanted to achieve is to get a running total where all entries within a month are summed up.

I found a solution that works, where i create a new column which equals the the binned date group and use this column in my measure:

Cumulative Total = 
CALCULATE(SUM(Fact[Amount]),
    FILTER(ALL(Fact[BinnedDate]),
        Fact[BinnedDate] <= MAX(Fact[BinnedDate])
        )
    )

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

Top Solution Authors