Forum Discussion
Anonymous
6 years agoNot applicable
Help with Ranking
Hi! I'm looking for help with the ranking function: I am looking for the DAX formula to rank Stores depending on the Value and within the same Cluster. I have one table with Clusters and corresp...
AntrikshSharma
Community Champion
6 years agoAnonymous Try this, file is attached below my signature:
Measure =
VAR OuterCluster =
SELECTEDVALUE ( Ranking[Cluster] )
VAR OuterValue = [Total Value]
VAR TempTable =
CALCULATETABLE (
ADDCOLUMNS (
SUMMARIZE ( Ranking, Ranking[Cluster], Ranking[Store] ),
"Val", [Total Value]
),
ALL ()
)
VAR FilterRows =
FILTER ( TempTable, Ranking[Cluster] = OuterCluster && [Val] >= OuterValue )
VAR Result =
COUNTROWS ( FilterRows )
RETURN
Result