Forum Discussion
bhelou
5 years agoResponsive 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...
- 5 years ago
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
amitchandak
5 years agoSuper 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))
)
- bhelou5 years agoResponsive 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