Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have made this table to calculate a top 5 + Others:
Top5 =
VAR Summary_01 =
ADDCOLUMNS (
VALUES ( 'Data'[Store]),
"Total", CALCULATE ( SUM ( 'Data'[NET_SALES] ) )
)
VAR Summary_02 =
ADDCOLUMNS ( Summary_01, "Ranking", RANKX ( Summary_01, [Total] ) )
VAR TablesRankLess_And_Equal_To_5 =
FILTER ( Summary_02, [Ranking] <= 5 )
VAR TablesRankGreater_Than_5 =
ROW (
"Store", "Others",
"Total", SUMX ( FILTER ( Summary_02, [Ranking] > 2 ), [Total] ),
"Ranking", 6
)
VAR UnionAllRecords =
UNION ( TablesRankGreater_Than_5, TablesRankLess_And_Equal_To_5 )
RETURN
UnionAllRecords
This gives me this table:
| Store | Total | Ranking |
| Others | 11000 | 6 |
| Store A | 2000 | 5 |
| Store F | 3000 | 4 |
| Store D | 5000 | 2 |
| Store H | 4000 | 3 |
| Store B | 6000 | 1 |
I've linked the Store column in the Top5 table to the Store column in the main Data table. When I apply a Location slicer to see which are the Top 5 per each location, the calculation stays the same despite me changing the location. Can anyone help please?
Solved! Go to Solution.
See the updated PBIX file. Yo uneed two columns in your base table. No need to create a new summarized table.
PBIX file link: https://1drv.ms/u/s!Aq3n-sopiGyqgokenHLsz-OES2UpIQ?e=3f837b
Proud to be a Super User!
See the updated PBIX file. Yo uneed two columns in your base table. No need to create a new summarized table.
PBIX file link: https://1drv.ms/u/s!Aq3n-sopiGyqgokenHLsz-OES2UpIQ?e=3f837b
Proud to be a Super User!
Hi @Anonymous
Since you are joining the the two tables on column Store, it will not find the Store = 'Other'. From a business stand point, it's not important to show the 6th ranked store as 'Other'. Here's my soloution to create your calculated table as ...
Proud to be a Super User!
I do need Other actually, Other is the sales of all stores that aren't in top 5, it's not the 6th ranked store renamed as Other
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 128 | |
| 88 | |
| 79 | |
| 67 | |
| 62 |