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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

running total with filter date

Can any one help with dax for filter date and car number should get running total of the person from stating 

example table

NameCar AmountType of debitDateNetDebitCreditBalance
XYZ XX car1000Amount debit21-03-2024 00:051000100001,000.00
XYZ XX car1000Amount debit21-03-2024 00:051000100002,000.00
XYZ XX car160Amount debit21-03-2024 00:0516016002,160.00
XYZ XX car172.36Amount debit21-03-2024 00:05172.36172.3602,332.36
XYZ XX car125Amount debit21-03-2024 00:0512512502,457.36
XYZ XX car12.76Amount debit21-03-2024 00:0512.7612.7602,470.12
XYZ XX car1608.74OnlinePayment21-03-2024 00:05-1608.701608.74861.38
1 ACCEPTED SOLUTION
vivek31
Resolver II
Resolver II

Hi, @Anonymous 

 

try below code for measure

running total = CALCULATE(SUM('Table (4)'[Balance]),
                               FILTER(
                                ALLSELECTED('Table (4)'),
                                'Table (4)'[Date]<=MAX('Table (4)'[Date])))

 

vivek31_0-1711085690400.png

 

All date are same that the reason total balance are same in all row

 


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
vivek31
Resolver II
Resolver II

Hi, @Anonymous 

 

try below code for measure

running total = CALCULATE(SUM('Table (4)'[Balance]),
                               FILTER(
                                ALLSELECTED('Table (4)'),
                                'Table (4)'[Date]<=MAX('Table (4)'[Date])))

 

vivek31_0-1711085690400.png

 

All date are same that the reason total balance are same in all row

 


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

Anonymous
Not applicable

Hi Thank you for reply,

 actually there is not balance colume i required a balance colume as a running total so that if it filter a car number automatically it should the balnce from start date to end date as shown in the example but your query will show the same for all the days

 

Dangar332
Super User
Super User

Hi, @Anonymous 

try below code for new column

Column = 
SUMX(
    FILTER(
        ALL('Table (2)'),
         'Table (2)'[Name]=EARLIER('Table (2)'[Name]) && 
         'Table (2)'[Car ]=EARLIER('Table (2)'[Car ]) && 
         'Table (2)'[Date]<=EARLIER('Table (2)'[Date])
    ),
    'Table (2)'[Balance]
)

 

just adjust table name and column name

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

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.