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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Running Total for a value in DAX measure

Hello DAX People,
So basically I need to create a Running Total, I have created a measure which is calculating active EMIs(SIP), I have visualized it on the bargraph as well (screenshot attatched).

 

miiihiir_0-1673605597180.png

Calculations for Measure:

Active SIP =
[Total SIP Started] - [Total SIP Stopped/ Completed]
 
Total SIP Started =
CALCULATE(SUM('T_ORDER (For SIP)'[order_amount]), FILTER('T_ORDER (For SIP)', 'T_ORDER (For SIP)'[order_type] = "SIP" && ('T_ORDER (For SIP)'[order_status] = "Executed" || 'T_ORDER (For SIP)'[order_status] = "Running" || 'T_ORDER (For SIP)'[order_status] = "Stopped" || 'T_ORDER (For SIP)'[order_status] = "Completed")))
 
Total SIP Stopped/ Completed =
CALCULATE(SUM('T_ORDER (For SIP)'[order_amount]), FILTER('T_ORDER (For SIP)', 'T_ORDER (For SIP)'[order_type] = "SIP" && ('T_ORDER (For SIP)'[order_status] = "Stopped" || 'T_ORDER (For SIP)'[order_status] = "Completed")))
 

So,

Here one more thing we need to add in this bar graph, is an another bar showing running total of EMIs over months. 
I tried creating the same using this logic:

Cumulative =
CALCULATE([Running SIP], FILTER('T_ORDER (For SIP)', 'T_ORDER (For SIP)'[order_date] <= MAX('T_ORDER (For SIP)'[order_date])))
 
Also used this measure also:
 
Run SIP =
SUMX(FILTER(ALL('T_ORDER (For SIP)'[order_date]), 'T_ORDER (For SIP)'[order_date] <= MAX('T_ORDER (For SIP)'[order_date])), [Running SIP])
 
and both of them are not working for this problem statement, it is showing like this, need runnning total rather than this.

miiihiir_1-1673606002704.png

 

So is there any other logic in your mind which could be working in this scenario?

 

Thanks

Mihir 

1 ACCEPTED SOLUTION

Try Using this measure:

Cummulative SIP =

CALCULATE([Running SIP], FILTER(ALLSELECTED('TableName'), 'TableName'[date] <= MAX('TableName'[date])))

View solution in original post

3 REPLIES 3
v-yueyunzh-msft
Community Support
Community Support

Hi , @Anonymous 

According to your description, you want to calculate the rolling total from a measure?
If this , here are the steps you can refer to :
(1)This is my test data:

vyueyunzhmsft_0-1673840134382.png

(2)We need to create a date table as  a dimension table:

Date = ADDCOLUMNS( 
CALENDAR(FIRSTDATE('Table'[Date]),LASTDATE('Table'[Date])),
"Year", YEAR ( [Date] ),
"Month", MONTH([Date]),
"Year_Month", year([Date]) * 100 + MONTH([Date])
)

And we need to create a relationship between two tables:

vyueyunzhmsft_1-1673840179668.png

In my test measure is this:

My Measure = SUM('Table'[Value])

(3)Then we can create a measure like this:

Rolling Total = var _t = SUMMARIZE(ALLSELECTED('Date') ,'Date'[Year_Month] , "measure" , [My Measure])
var _cur_year_month = MAX('Date'[Year_Month]) 
var _t2 =FILTER(_t , [Year_Month]<=_cur_year_month)
return
SUMX(_t2, [measure])

Then we can get the rolling total:

vyueyunzhmsft_2-1673840237106.png

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

Try Using this measure:

Cummulative SIP =

CALCULATE([Running SIP], FILTER(ALLSELECTED('TableName'), 'TableName'[date] <= MAX('TableName'[date])))
johnt75
Super User
Super User

Try

Run SIP =
VAR MaxDate =
    MAX ( 'T_ORDER (For SIP)'[order_date] )
RETURN
    SUMX (
        FILTER (
            ALL ( 'T_ORDER (For SIP)'[order_date] ),
            'T_ORDER (For SIP)'[order_date] <= MaxDate
        ),
        [Running SIP]
    )

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.