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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
DAXUser
Frequent Visitor

Display first 10 values as is and remaining row values with specific name

Hi ,

 

  There are many rows in my table. The Category name should be displayed in its current form for the first 10 rows. For the remaining records, starting with row 11, the Category should be displayed as "Others," and the remaining total values must be summed. The report connected with Live Connection

 

CategoryTotal
a30
b40
c50
d60
e70
f80
g90
h100
i110
j120
k130
l140
m150
n160

 

Expected Output

CategoryTotal
a30
b40
c50
d60
e70
f80
g90
h100
i110
j120
others580

 

Thanks

1 ACCEPTED SOLUTION
TomasAndersson
Solution Sage
Solution Sage

Hi!
Check out this guide: Display Top N items and Others in Power BI - Goodly

You will have to modify it according to your use case. For example, define what columns defines the sorting order, i.e. what will be the top 10 and what will be Other. 

Since you know that you want top 10, you don't have to bother about implementing the dynamic top N slicer.

 

Good luck!

View solution in original post

3 REPLIES 3
DAXUser
Frequent Visitor

@TomasAndersson 

This solved my problem. Thanks for the solution.

FreemanZ
Super User
Super User

hi @DAXUser 

try to create a calculated table with this:

Table = 
VAR _table1=
TOPN(
    10,
    data,
    [Total],    
    ASC
)
VAR _table2 =
EXCEPT(data, _table1)

VAR _table3 =
ROW(
    "Category", "Others",
    "Total", SUMX(_table2, data[Total])
)
RETURN
UNION(_table1, _table3)

 

it worked like this:

FreemanZ_0-1674139589769.png

 

TomasAndersson
Solution Sage
Solution Sage

Hi!
Check out this guide: Display Top N items and Others in Power BI - Goodly

You will have to modify it according to your use case. For example, define what columns defines the sorting order, i.e. what will be the top 10 and what will be Other. 

Since you know that you want top 10, you don't have to bother about implementing the dynamic top N slicer.

 

Good luck!

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors