Forum Discussion
DAX RANKX Dynamic Top N by Multiple / Two Columns
Hi Rank Fans!
I know there have been similar questions posted, and I review those but still cannot solve for this issue.
I want to filter for Top 3 by two columns. In theis example, I want to return the Top 3 by Revenue per Property and Vendor. I want only the green values returned. I have tried multiple times using RankX, AllSelected and Calculate. The measure needs to be dynamic and reflect the Top 3 per Property and Vendor for the slicers slected by the user.
Thank you!
Anonymous , You can create a rank measure like and filter that for 3 in visual lebel filter
Rankx(filter(allselected(Table[Prop], Table[Vador]), [Prop] = max([Prop])),[Revenue])
Assuming revenue is measure
refer
https://www.sqlbi.com/articles/filtering-the-top-3-products-for-each-category-in-power-bi/
2 Replies
- amitchandakSuper User
Anonymous , You can create a rank measure like and filter that for 3 in visual lebel filter
Rankx(filter(allselected(Table[Prop], Table[Vador]), [Prop] = max([Prop])),[Revenue])
Assuming revenue is measure
refer
https://www.sqlbi.com/articles/filtering-the-top-3-products-for-each-category-in-power-bi/
- AnonymousNot applicable
That worked! Thank you so much!