Forum Discussion
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 :
Dear amitchandak
Thank you for the measure , i made it as follow and workedBalance 1 =CALCULATE(SUM('Test'[Balance]),FILTER(ALLSELECTED(Test),Test[Rank_By_Vendor]<=MAX(Test[Rank_By_Vendor])))
Many thanks for your help
2 Replies
- amitchandak
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))
)- bhelou
Responsive Resident
Dear amitchandak
Thank you for the measure , i made it as follow and workedBalance 1 =CALCULATE(SUM('Test'[Balance]),FILTER(ALLSELECTED(Test),Test[Rank_By_Vendor]<=MAX(Test[Rank_By_Vendor])))
Many thanks for your help