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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
arichard19
Resolver I
Resolver I

Cumulative Total with an additional filter category

I would like to filter the running cumulative total based on categories. However, the general running cumulative total measure I use, does not appear to be filtering correctly. At the moment, my work around has been creating a CalculatedTable where I filter based on the category and then create a cumulative total measure on the filtered table. This returns the correct values. I do realize that for performance reasons this is definitely not the best way to go. Ideally, I should be able to take the following measure: 

Amount running total in %Date =
CALCULATE(
    SUM('Sachposten'[Amount]),
    FILTER(
        ALLSELECTED('Kalender'[%Date]),
        ISONORAFTER('Kalender'[%Date], MAX('Kalender'[%Date]), DESC)
    )
)
 
and do the following 
Amount running total in %Date =
CALCULATE(
    SUM('Sachposten'[Amount]),
    FILTER(
        ALLSELECTED('Kalender'[%Date]),
        ISONORAFTER('Kalender'[%Date], MAX('Kalender'[%Date]), DESC)
    ),
    FILTER(
       Sachposten, Sachposten[Category II ] = "Current Liabilities" )
    )
)
 
As of right now, doing this returns the incorrect values
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@arichard19 , Try like

Amount New = CALCULATE(
SUM('Sachposten'[Amount]),
FILTER(
Sachposten, Sachposten[Category II ] = "Current Liabilities" )
)

Amount running total in %Date =
CALCULATE(
[Amount New],
FILTER(
ALLSELECTED('Kalender'[%Date]),
ISONORAFTER('Kalender'[%Date], MAX('Kalender'[%Date]), DESC)
)
) 

 

or

Amount running total in %Date =
CALCULATE(
    SUM('Sachposten'[Amount]),
    FILTER(
        ALLSELECTED('Kalender'[%Date]),
        ISONORAFTER('Kalender'[%Date], MAX('Kalender'[%Date]), DESC)
    ),
       Sachposten, Sachposten[Category II ] = "Current Liabilities" )

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Share some data and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
V-lianl-msft
Community Support
Community Support

Hi @arichard19 ,

 

Try :

Amount running total in %Date =
IF(MAX(Sachposten[Category II ]) = "Current Liabilities",
CALCULATE(
    SUM('Sachposten'[Amount]),
    FILTER(
        ALLSELECTED('Kalender'[%Date]),
        ISONORAFTER('Kalender'[%Date], MAX('Kalender'[%Date]), DESC)
    )
    )
)

 

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

amitchandak
Super User
Super User

@arichard19 , Try like

Amount New = CALCULATE(
SUM('Sachposten'[Amount]),
FILTER(
Sachposten, Sachposten[Category II ] = "Current Liabilities" )
)

Amount running total in %Date =
CALCULATE(
[Amount New],
FILTER(
ALLSELECTED('Kalender'[%Date]),
ISONORAFTER('Kalender'[%Date], MAX('Kalender'[%Date]), DESC)
)
) 

 

or

Amount running total in %Date =
CALCULATE(
    SUM('Sachposten'[Amount]),
    FILTER(
        ALLSELECTED('Kalender'[%Date]),
        ISONORAFTER('Kalender'[%Date], MAX('Kalender'[%Date]), DESC)
    ),
       Sachposten, Sachposten[Category II ] = "Current Liabilities" )

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors