Forum Discussion
top 10 item
Hi there,
I'm still new to Power BI and need help in create view for Top 5 item.
Below is the table consist of Product with quantity sold.
I intended to view the report in power bi by viewing only the top five item.
Product Quantity
Apple 200
Banana 150
Cucumber 400
Daikon 350
Egg 300
Fish 250
Ice 100
Juice 50
Kiwi 175
Lemon 275
Mango 375
How do i create the report with power bi?
Thanks,
Robert
You can create another table which only contains the top 5 items using TOPN function.
Top5 = TOPN ( 5, Table1, CALCULATE ( SUM ( Table1[Quantity] ) ) )
You can also create a measure to rank the quantity using RANKX function. And use this measure as visual level filter to get the top N items.
Rank = RANKX ( ALLSELECTED ( Table1[Product] ), CALCULATE ( SUM ( Table1[Quantity] ) ) )I’ve also uploaded my PBIX file here for reference.
Best Regards,
Herbert
1 Reply
- v-haibl-msft
Microsoft Employee
You can create another table which only contains the top 5 items using TOPN function.
Top5 = TOPN ( 5, Table1, CALCULATE ( SUM ( Table1[Quantity] ) ) )
You can also create a measure to rank the quantity using RANKX function. And use this measure as visual level filter to get the top N items.
Rank = RANKX ( ALLSELECTED ( Table1[Product] ), CALCULATE ( SUM ( Table1[Quantity] ) ) )I’ve also uploaded my PBIX file here for reference.
Best Regards,
Herbert