Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Category | Total |
a | 30 |
b | 40 |
c | 50 |
d | 60 |
e | 70 |
f | 80 |
g | 90 |
h | 100 |
i | 110 |
j | 120 |
k | 130 |
l | 140 |
m | 150 |
n | 160 |
Expected Output
Category | Total |
a | 30 |
b | 40 |
c | 50 |
d | 60 |
e | 70 |
f | 80 |
g | 90 |
h | 100 |
i | 110 |
j | 120 |
others | 580 |
Thanks
Solved! Go to Solution.
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!
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:
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!
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
12 | |
11 | |
7 | |
6 |