Forum Discussion

sthomas38's avatar
sthomas38
Frequent Visitor
3 years ago
Solved

Distinct values for a Ranking measure

Hi All, I am trying to get a calculated measure for rank. When I use SKIP and DENSE, I do not get what I expect. My data has the following fields, Network, Provider ID, State, MSA, County and Zip. ...
  • sthomas38's avatar
    3 years ago

    I found a solution from youtube - alphabetical rank calculation. 

    Create a measure such as this -

    Alphabetic Rank =

    VAR _curNetwork = SELECTEDVALUE(Table[Network])

    VAR res = COUNTROWS( FILTER( ALL(Table[Network]), Table[Network] <= _curNetwork ) )

    RETURN res  

     

    The next rank measure calculation is - 

    RANK_ALL = RANKX( ALL(Table[Network]), [Provider Count] + DIVIDE([Alphabetic Rank],100), ,DESC ) 

     

    This works very well - I am able to filter by State, MSA, Region, County and Zip just by using this one calculation. 

    Thank you 🙂