Forum Discussion
amilecki
9 years agoFrequent Visitor
RANKX Always Returns 1
I am trying to learn the RANKX expression using a couple examples on the web but every row returns 1. I have found a couple suggested solutions, none of which have worked for me. I have simplifi...
- 9 years ago
If you do want to use a Rank Measure in the Visual Filter you have to adjust how the sum is calculated like this...
Rank Product = RANKX ( ALL(MyData[Product] ), CALCULATE ( SUM ( MyData[Quantity] ), ALLEXCEPT(MyData, MyData[Product] ) ) )
See below...
Hope this helps! :smileyhappy:
Sean
Community Champion
9 years agoSean
Community Champion
9 years agoIf you do want to use a Rank Measure in the Visual Filter you have to adjust how the sum is calculated like this...
Rank Product = RANKX ( ALL(MyData[Product] ), CALCULATE ( SUM ( MyData[Quantity] ), ALLEXCEPT(MyData, MyData[Product] ) ) )
See below...
Hope this helps! :smileyhappy: