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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
PowerBiTech
Frequent Visitor

Display top 10 records in the table with multiple columns

Good afternoon.

 

I'd like to ask for help with a topic I'm trying to accomplish.

This is a table that has the following structure.

 

PowerBiTech_0-1717535131666.png

Need to display only top 10 records when ever any filter is applied and this table should dynamiclly change. 

Highlighted 10 records should be display and country name can be duplicate no worries. 

expected result to show only highlighed in the red box. 

 

Please guide me to filter. attached Top 10 filter file .pbix file link for your reference.

 

@Greg_Deckler @Ritaf1983 @lbendlin @Ashish_Mathur @ryan_mayu @danextian @_AAndrade @vicky_ @audreygerred @rajendraongole1 

4 REPLIES 4
Anonymous
Not applicable

Hi @PowerBiTech 

 

Thanks for the reply from @vicky_ , please allow me to provide another insight:

 

Here I create a new measure:

MEASURE =
VAR _currentCustomName =
    SELECTEDVALUE ( DimCustomers[Customer Name] )
VAR _vtable =
    SELECTCOLUMNS (
        ALLSELECTED ( 'DimCustomers' ),
        'DimCustomers'[Customer Name],
        "Total", [Total Sales]
    )
VAR _vtable2 =
    TOPN (
        10,
        ADDCOLUMNS ( _vtable, "_Rank", RANKX ( _vtable, [Total],, DESC ) ),
        [Total]
    )
RETURN
    MAXX ( FILTER ( _vtable2, _currentCustomName = [Customer Name] ), [Total] )

Then add the measure to the table, the result is as follow:

vzhengdxumsft_0-1717566460811.png

 

Best Regards

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

Hi @Anonymous 

Thank you so much for your quick response .

I have tried to apply the same measure into my orginal data and unable to get the expected result. 

Total score is a calculated measure column. 

PowerBiTech_1-1717588956258.png

Red box should be the output result. 

Subdivision and Total score can be duplicate. 

Please suggest me to get this output.

 

PowerBiTech
Frequent Visitor

@vicky_ i Have done that but its not working 

vicky_
Super User
Super User

You should be able to use the built-in top-10 filter:

vicky__0-1717539988900.png

go to country, change Filter type to Top N, set N = 10 and use your sales measure in the "By Value" section

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors