Forum Discussion
pdory
2 years agoFrequent Visitor
Need help with cumulative total without date
Hi everyone, I'm looking for some help to create a DAX measure that will show the cumulative total of the Supplier Spend starting from the highest value. Here is a link to the pbix: Link to s...
- 2 years ago
output :
measure :
Measure = CALCULATE( [spend], WINDOW( 0,ABS, 0,REL, ALLSELECTED(Spend[Supplier Name]), ORDERBY([spend] ,DESC) ) )If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution ✅
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠 - 2 years ago
forgot to mention :
create a measure
spend = sum(table_name[spend])
If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution ✅
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠 - 2 years ago
try this one :
spend = SUM(Spend[Supplier Spend])rnk =RANKX(ALLSELECTED('Spend'[Supplier Name]), [Spend], , DESC, Dense)Running Total =VAR CurrentRank = [rnk]RETURNCALCULATE([spend],FILTER(ALLSELECTED(Spend[Supplier Name]),[rnk] <= CurrentRank))let me know if this works for you .
Daniel29195
Community Champion
2 years agotry this one :
spend = SUM(Spend[Supplier Spend])
rnk =
RANKX(ALLSELECTED('Spend'[Supplier Name]), [Spend], , DESC, Dense)
Running Total =
VAR CurrentRank = [rnk]
RETURN
CALCULATE(
[spend],
FILTER(
ALLSELECTED(Spend[Supplier Name]),
[rnk] <= CurrentRank
)
)
let me know if this works for you .
pdory
2 years agoFrequent Visitor
I still got the error a few times but it eventually worked. Thank you for your help!