Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
rcatan
New Member

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

1 ACCEPTED SOLUTION
v-haibl-msft
Employee
Employee

@rcatan

 

You can create another table which only contains the top 5 items using TOPN function.

Top5 = 
TOPN ( 5, Table1, CALCULATE ( SUM ( Table1[Quantity] ) ) )

top 10 item_1.jpg

 

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] ) )
)

top 10 item_2.jpg

 

I’ve also uploaded my PBIX file here for reference.

top 10 item.jpg

 

Best Regards,

Herbert

View solution in original post

1 REPLY 1
v-haibl-msft
Employee
Employee

@rcatan

 

You can create another table which only contains the top 5 items using TOPN function.

Top5 = 
TOPN ( 5, Table1, CALCULATE ( SUM ( Table1[Quantity] ) ) )

top 10 item_1.jpg

 

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] ) )
)

top 10 item_2.jpg

 

I’ve also uploaded my PBIX file here for reference.

top 10 item.jpg

 

Best Regards,

Herbert

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.