Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |