Forum Discussion
SQLDev
2 years agoRegular Visitor
Clarification Needed: How Filters Work
As someone who is new to Power BI and just starting to learn, I'm trying to rank products based on their orders. However, I'm encountering an issue where the ranking does not update correctly when I ...
- 2 years ago
Initially, the DAX expression wasn't working because I created a calculated column instead of a measure. Once I used the same formula as a measure, it worked perfectly.
RankProducts = RANKX(ALLSELECTED('Product Lookup'), [Total Orders], ,DESC,Dense)
SQLDev
2 years agoRegular Visitor
Thanks for the suggestion. I tried your solution, but it resulted in an error because CategoryName and ProductName are in two different tables:
- 'Product Categories Lookup'[CategoryName]
- 'Product Lookup'[ProductName]
Jihwan_Kim
Super User
2 years agoI am not sure how your semantic model looks like, but please try something like below.
RankProducts =
RANKX (
ALLSELECTED ( 'Product Lookup'[ProductName] ),
[Total Orders],
,
DESC,
DENSE
)