Forum Discussion
Fixed versus Dynamic Rank with RankX
- Anonymous6 years ago
// This is a global rank that // does not respond to // any filters. [Product Profit Fixed Rank] = RANKX( ALL( Orders[Product Name] ) CALCULATE( SUM( Orders[Profit] ), ALLEXCEPT( Orders, Orders[Product Name] ) ) )
Sorry, I dont follow what you are trying to say. Isn't the point of using ALL so that the expression will ignore filter context?
ALL - "Returns all the rows in a table, or all the values in a column, ignoring any filters that might have been applied. This function is useful for clearing filters and creating calculations on all the rows in a table."
So if I want to create a universal rank that stays the same is there a way to adjust my current formula to do that?
https://drive.google.com/file/d/1eqGAh4aieAVV9LgsM1heHP62Ey65Usu4/view?usp=sharing
// This is a global rank that
// does not respond to
// any filters.
[Product Profit Fixed Rank] =
RANKX(
ALL( Orders[Product Name] )
CALCULATE(
SUM( Orders[Profit] ),
ALLEXCEPT(
Orders,
Orders[Product Name]
)
)
)- Anonymous6 years agoNot applicable
Amazing. Exactly what I was looking for. Thanks!
- Anonymous3 years agoNot applicable
Yep, works perfectly. Exactly what I needed as well. The requirement description is very clear and this proposed solution works well. I still don't understand why the ALL() function is not enough to remove all the filters, wether in the visual itself as well as filters in slicers and in the filters pane, but the solution works. Thanks so much.