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!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
I need help?
I have written DAX for TOP 5 Case and remaining should be in 'Other' category based on MAX COUNT casetype that is working but problem is in duplicate rank. I have written in TOM Model and RLS has applied:
M2:=
VAR Curr_Case =
MAX ( FactCase[CaseType] )
VAR Temp_Tab =
ALL ( FactCase )
VAR Temp_Tab1 =
SUMMARIZE (
Temp_Tab,
FactCase[CaseType],
"_ACount", COUNTA ( FactCase[CaseType] )
)
VAR Temp_Tab2 =
ADDCOLUMNS ( Temp_Tab1, "ARANK", RANKX ( Temp_Tab1, [_ACount] ) )
RETURN
MAXX ( FILTER ( Temp_Tab2, [CaseType] = Curr_Case ), [ARANK] )
Hi @Tejesh_Gour ,
I tested your provided DAX formula with my sample data, it returned expected RANK value which skips duplicates. You just need an extra measure to class the casetype.
Category = IF([Rank measure]<=5,SELECTEDVALUE(FactCase[CaseType]),"Other")
Best regards,
Yuliana Gu
ExpectedOutput I cannot keep in legend(chart) which you have given that is calculated column. In chart I want to use this column in legent section and measure will be count. If you are not clear then I will send sample data file as well.
Only single value is showing. I have written in TOM Model.
Not working!
Hi @Tejesh_Gour ,
From this screenshot, were [CaseType] and [M2] both measures? If so, it indeed returns only one single row because there is no row context in such a visual. You have to place some other fields like [CaseType] into visual.
Regards,
Yuliana Gu
I need only CaseType and Count in visualization(Column chart) based on date but here measure i can't show in legend.
Hi @Tejesh_Gour ,
I am confused about your scenario, would you please share the sample .pbix file for check?
Regards,
Yuliana Gu
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.