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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
bhelou
Responsive Resident
Responsive Resident

Running Total

Dear ,

 

Kindly i am trying to make a running total for the balance as shown in the image , 
it is based on a rank by vendor :

i have tried a quick measure it wont give a rnning total correct nor the total amount correct

1 - Running total measure : 

Balance running total in Rank_By_Vendor 2 =
CALCULATE(
    SUM('Test'[Balance]),
    FILTER(
        ALLSELECTED('Test'[Rank_By_Vendor]),
        ISONORAFTER('Test'[Rank_By_Vendor], MIN('Test'[Rank_By_Vendor]), DESC)
    )
)
 
2 : i have tried another measure :
Balance Running Total =
CALCULATE(
    SUM('Test'[Balance]),
    FILTER(
        (Test),
        Test[Vendor_Number] = LASTNONBLANK(Test[Vendor_Number],Test[Vendor_Number])
    )
)
 
// it gave me the balance correct but no running total .
 
balance in running total should be like this :
-130,725.00
-155,925.00
-173,250.00
etc........
 
 
Many thanks for your help .
 
running total.png
 
1 ACCEPTED SOLUTION

Dear @amitchandak 

Thank you for the measure , i made it as follow and worked 

Balance 1 =
CALCULATE(
SUM('Test'[Balance]),
FILTER(
ALLSELECTED(Test),Test[Rank_By_Vendor]<=MAX(Test[Rank_By_Vendor])))

Many thanks for your help 

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@bhelou , you need to have some unique value for running total.

 

Try like

 

CALCULATE(
SUM('Test'[Balance]),
FILTER(
ALLSELECTED('Test'[TransactionLine_Unique]),
'Test'[TransactionLine_Unique]>= MIN(TransactionLine_Unique))
)

 

or


CALCULATE(
SUM('Test'[Balance]),
FILTER(
ALLSELECTED('Test'[TransactionLine_Unique]),
'Test'[TransactionLine_Unique]<= MAX(TransactionLine_Unique))
)

 

or

 

CALCULATE(
SUM('Test'[Balance]),
FILTER(
ALLSELECTED('Test'),
'Test'[TransactionLine_Unique]<= MAX(TransactionLine_Unique))
)

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

Dear @amitchandak 

Thank you for the measure , i made it as follow and worked 

Balance 1 =
CALCULATE(
SUM('Test'[Balance]),
FILTER(
ALLSELECTED(Test),Test[Rank_By_Vendor]<=MAX(Test[Rank_By_Vendor])))

Many thanks for your help 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.