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! Learn more

Reply
kman42
Frequent Visitor

Running total on a filtered table

I have a table with revenues and expenses that is filtered by a slicer using Forecast ID. I'm trying to get a running total (Forecast Cumulative), but I can't seem to get the measure right. Here's what my table looks like. Forecast Cumulative is the measure:

Screenshot 2024-11-01 at 4.12.44 PM.png

 

The measure is: 

Forecast Cumulative = calculate(sum('Forecast Date Revenue Expense'[Revenue])-sum('Forecast Date Revenue Expense'[Expense]))

 

As you can see, it is just subtracting the expense from the revenue for each row. I need it to generate a running total so Forecast Cumulative should be:

15195

20204

11679

4530

etc

 

I'm sure I have the filters wrong, but not sure how to fix it.

 

Thanks!

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @kman42 ,

 

try like:

Forecast Cumulative = 

CALCULATE(

     sum('Forecast'[Revenue])-

sum('Forecast'[Expense]),

    Forecast[date]<=MAX(Forecast[date])

)

View solution in original post

1 REPLY 1
FreemanZ
Super User
Super User

hi @kman42 ,

 

try like:

Forecast Cumulative = 

CALCULATE(

     sum('Forecast'[Revenue])-

sum('Forecast'[Expense]),

    Forecast[date]<=MAX(Forecast[date])

)

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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