Forum Discussion
Anonymous
3 years agoNot applicable
RANKX with filter
Hi! I'm trying to create a DAX measure using RANKX, but I need help. I start with the table to the left where I see all my products and what rank they have based on sales. Then I want to be able to ...
- Anonymous3 years ago
Hi Anonymous ,
I doubt that [Sales] here is a field without summarize.
If so, please sum this field.
then please new:
Total Sales = SUM('Table'[Sales])Rank = RANKX(ALL('Table'[Product],'Table'[Supplier]),[Total Sales])Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Rachid1679
2 years agoRegular Visitor
Hello Ellac
Hope you're doing well.
I'm facing the same issue with rankx measure. Were you able to find a solution ?
Thank you for the support
Anonymous
2 years agoNot applicable
Hi Rachid1679,
Yes! The accepted solution of this thread worked 🙂 The resulting measure was this:
VAR __variableRank = RANKX(ALL('Table'[Product], 'Table'[Supplier]), [Sales])
RETURN
IF(
__variableRank < 101,
__variableRank,
BLANK()
)
I ended the measure expression with an if statement which gives me top 100 on the ranking.
Hope it works for you too!
/Ella