Forum Discussion
RANKX Measure always 1
- Anonymous6 years ago
_chris_
There are some differences of using RANKX() in a calculated column and a measure.Calculated Column:
Column = RANKX('vbasFASTEC_WaWiVKBelegpositionen',[Umsatz],,DESC,Dense)Measure:
Measure = RANKX(ALL('vbasFASTEC_WaWiVKBelegpositionen'),CALCULATE(SUM([Umsatz])),,DESC,Dense)Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The measure. Throw in an ALL() somewhere.
Read up on row context and filter context. It will be confusing at first but it is fundamental to enjoying DAX in the long run.
That´s what I also had tried before:
RANKX(ALL(vbasFASTEC_WaWiVKBelegpositionen), [SumUmsatz])
But I still get the same result.
Yesterday I looked some videos about DAX theory as I agree it is important to understand the basics. Actually, I was of the opinion to have understood it...
Even if I add the Id column to the table (the data is not aggregated anymore) the rank is always 1...
- Anonymous6 years agoNot applicable
_chris_
There are some differences of using RANKX() in a calculated column and a measure.Calculated Column:
Column = RANKX('vbasFASTEC_WaWiVKBelegpositionen',[Umsatz],,DESC,Dense)Measure:
Measure = RANKX(ALL('vbasFASTEC_WaWiVKBelegpositionen'),CALCULATE(SUM([Umsatz])),,DESC,Dense)Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. - lbendlin6 years ago
Super User
SumUmsatz := sum(vbasFASTEC_WaWiVKBelegpositionen[Umsatz]) Rank Test := RANKX(all(vbasFASTEC_WaWiVKBelegpositionen), [SumUmsatz])