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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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