Forum Discussion
Anonymous
7 years agoNot applicable
How do i add Ranking to Multiple Rows with the same brand but different models
Hi, I am new to Power BI and need your assistance Basically i have a table in power BI as below which i would like to rank by item based on number of units sold, The only thing is there are mu...
v-juanli-msft
7 years agoCommunity Support
Hi Anonymous
"I would like to Rank the above but based on the highest units sold and then at any point it should also rank by Brand if i select a specific brand."
From above, it seems you want to rank sales units by brand on descending order.
To get this, Create measures
Measure = SUM(Sheet2[Sales units]) Measure 2 = RANKX(ALLSELECTED(Sheet2),[Measure],,DESC)
To show Top n rank, create a Top N table without being connected with your data table, then create a measure and add this meausre in the visual level filter of the table visual.
Measure 3 = IF([Measure 2]<=SELECTEDVALUE('Top N'[Top N]),1,0)
Download my pbix and see more details.
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.