Forum Discussion
chsardas
8 years agoRegular Visitor
Running total with ranking
Hi, I'm trying to do a Running Total based on a rank of a measure. After a little of research i've found the way to do the running total but i'm having a trouble with that. I create a rank m...
- 8 years ago
Finnally i´ve got the solution.
I´ve changed the approach of the formula.
Used this guide (it´s in spanish)
Zubair_Muhammad
8 years agoCommunity Champion
Hi chsardas
Could you try this?
Running Total =
CALCULATE (
[QTR Quantity],
(
TOPN (
[Ranking City],
ALL ( Sales[City] ),
[QTR Quantity]
+ RANDBETWEEN ( 1, 100 ) / 1000
)
)
)- chsardas8 years agoRegular Visitor
Thanks for your reply!.
Now it only sum one of the members which are tied.
But the behavior i expect is cardenas shoud be 11.511 + 515 and COMALCALCO should be 12.026 + 515.
- Zubair_Muhammad8 years agoCommunity Champion
HI chsardas
Instead of Running_Total try doing this for Ranking City
The idea is to differentiate between 2 similar Ranks by decimal points. You can hide the decimals for RANKING
Ranking City = RANKX ( ALL ( Sales[City] ), [QTR Quantity],, DESC, SKIP ) + RANDBETWEEN ( 1, 100 ) / 1000- chsardas8 years agoRegular Visitor
Nice idea, now the ranking shows different values:
But the running total keeps returning the same, it looks like the top n doesn't take care of the decimal. :(