Forum Discussion
TCavins
6 years agoHelper V
RANKX Help
I have a table with the following columns. Person Site Manager IncidentID I want my visualization to be: Person, Site, Manager, DISTINCTCOUNT(IncidentID), Rank(1 - whatever, based on the ...
TCavins
6 years agoHelper V
Found another solution that is close but the rank numbers are off, especially if Manager is empty:
Measure 3 =
Var summry = SUMMARIZE(ALLSELECTED(MyTable),[Person],"DistCount",DISTINCTCOUNT(MyTable[INCIDENTID]))
var tmp = ADDCOLUMNS(summry,"RNK", RANKX(summry,[DistCount],,DESC,DENSE))
return
MAXX(FILTER(tmp,[Person]=SELECTEDVALUE(MyTable[Person])),[RNK])
Gives the following output. The second row should be rank 2 and the first row should be rank 1. I've blocked out any preson information. Columns are Person, manager, distinct count of IDs then 3 measure I'm trying for rank. Last column is the measure above.
v-kelly-msft
6 years agoCommunity Support
Hi TCavins ,
Try to create a calculated column as below:
Column =
VAR summry =
SUMMARIZE (
ALLSELECTED ( MyTable ),
[Person],
"DistCount", DISTINCTCOUNT ( MyTable[INCIDENTID] )
)
RETURN
RANKX ( summry, [DistCount],, DESC, DENSE )
Best Regards,
Kelly
- TCavins6 years agoHelper V
This isn't working for me.