Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hi Everyone,
I want to create group on top of States based up on count of coustomers.
where the rank of customers greater than 5 then it has to group together as 'Others' , rest diaply as it is.
The grouping should be dynamic based on Customers count.
Please find example below:
I have data like below Screen shot 1
And I have to create a group as below screen shot2
Need your help, Thanks,
Solved! Go to Solution.
Hi @Anonymous,
You can try to use below calculated column formula to achieve your requirement.
Logic:
1. Calculate current rank.
2, Add if statement to replace column name to other when rank greater than 5.
Categroy =
VAR summary =
SUMMARIZE ( 'Table', [Type], "Count", COUNT ( [Index] ) )
VAR _rank =
MAXX (
FILTER (
ADDCOLUMNS (
summary,
"Rank", RANKX ( summary, [Count], MAX ( [Count] ), DESC, DENSE )
),
[Type] = EARLIER ( 'Table'[Type] )
),
[Rank]
)
RETURN
IF ( _rank <= 5, [Type], "Other" )
Regards,
Xiaoxin Sheng
Hi @Anonymous,
You can try to use below calculated column formula to achieve your requirement.
Logic:
1. Calculate current rank.
2, Add if statement to replace column name to other when rank greater than 5.
Categroy =
VAR summary =
SUMMARIZE ( 'Table', [Type], "Count", COUNT ( [Index] ) )
VAR _rank =
MAXX (
FILTER (
ADDCOLUMNS (
summary,
"Rank", RANKX ( summary, [Count], MAX ( [Count] ), DESC, DENSE )
),
[Type] = EARLIER ( 'Table'[Type] )
),
[Rank]
)
RETURN
IF ( _rank <= 5, [Type], "Other" )
Regards,
Xiaoxin Sheng
Hi Xiaoxin,
I have a similar problem and your solution looks pretty neat.
Would you help me adapt your script to group [Type] by the share %?
In this example, if COUNT( [Index] ) as % of Total < 4% then "Other".
Many thanks!
Fiorenzo
It is working perfect as expected. Thanks much Xiaoxin Sheng...!
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 41 | |
| 37 | |
| 34 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 65 | |
| 62 | |
| 31 | |
| 26 | |
| 25 |