Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello,
Is there a way where we can have a list of the top 10 values (based on criteria) and the rest of the values can be clubbed as "Others" at 11th position? This needs to be dynamic as 10 top values may change with more data pouring in. I have created a sample matrix visual (see below) in the PBIX file placed here https://drive.google.com/file/d/17g5I_FCuchng8AtxevOQ9f9ncklJMnWu/view?usp=sharing
Thanks,
Anuj
@itsmeanuj , you can create a calculated table as follows.
CalculatedTable =
VAR StagingTable_a = SUMMARIZE(FILTER(ALLSELECTED(Sheet3),Sheet3[DENIAL_REASON]<>BLANK()),
[DENIAL_REASON],
"Count",COUNT(Sheet3[PATIENT_NUMBER])
)
VAR StagingTable_b = ADDCOLUMNS(StagingTable_a,"Rank",RANKX(StagingTable_a,[Count],,DESC,Dense))
VAR Top10_reason = SELECTCOLUMNS(FILTER(StagingTable_b,[Rank]<=10),"DENIAL_REASON",[DENIAL_REASON])
VAR Top10_table = FILTER(StagingTable_a,[DENIAL_REASON] IN Top10_reason)
VAR Others_table_staging = SELECTCOLUMNS(ADDCOLUMNS(FILTER(StagingTable_a,NOT([DENIAL_REASON] IN Top10_reason)),"Others","Others"),"DENIAL_REASON",[Others],"Count",[Count])
VAR Others_table = SUMMARIZE(Others_table_staging,[DENIAL_REASON],"Count",SUMX(Others_table_staging,[Count]))
VAR Result = UNION(Top10_table,Others_table)
RETURN
Result
And then use the Count column in the calculated table in your table vis, aggregraed using sum. The same applies for %GT but also show value as percentage of grand total.
Hi @itsmeanuj
This video has a good explanation on it: https://www.youtube.com/watch?v=JLK2e0k8OBE
Also this link: https://www.proserveit.com/blog/ms-power-bi-topn-and-other
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.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 44 | |
| 43 | |
| 38 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 67 | |
| 63 | |
| 30 | |
| 30 | |
| 23 |