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
Ramees_123
Helper IV
Helper IV

Get Top 5 Records in Power BI Table View Including Grouped Values

I am using my below table visual. I need to get the top 5 records based on current exposure amount field.


The top 5 condition should be including the group fileds Group name, updated orr and industry of risk fileds.

 

Please help.

 

Screenshot 2021-04-18 122016.jpg

11 REPLIES 11
v-janeyg-msft
Community Support
Community Support

Hi, @Ramees_123 

 

According to your description, I think you can create a calculated column and use it in filter pane. It needs to use rank nesting multiple times to avoid repeated rankings.

Like this:

Column = 
RANKX (
    ALL ( 'Table' ),
    RANKX ( ALL ( 'Table' ), [Current Exposure] ) * 100
        + RANKX ( ALL ( 'Table' ), [Industry] ) 
        + RANKX ( ALL ( 'Table' ), [ORR] ) 
        + RANKX ( ALL ( 'Table' ), [Group Name] ),,ASC
)

4.20.png

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

CTozzi
Resolver I
Resolver I

No. This doesn't help. @CTozzi 

Could you share a sample of your data?

@CTozzi  Please find the below data. I need the top 5 Current exposure to be in my table visual.

Capture.JPG

@Ramees_123 if I understood what you want, you can filter the top 5 by current exposure as the image below. Let me know if that is it.

 

Top 5.png

@CTozzi  No. In your example, you have found Top 5 current exposure supporting Group value alone.

But I am asking how to combine Group, ORR and Industry too.

 

Note: In your sample, if single group has multiple ORR or Industry, then you will end up with more than 5 rows here.

@Ramees_123 what exactly would you like to see in the columns ORR and Industry?

@CTozzi  In your sample data keep additional entry for Group 5 with other ORR and Industry.

 

Example :- Group 5 -- ORR 7 -- Industry 6 -- 100400

 

After addition, see what happens. It will show you 6 records instead of 5. That is my problem.

@Ramees_123 what if you change the visualization to a Matrix? Then you can choose to collapse each group line. 

@CTozzi  No. Not looking for matrix visuals.

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.