Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

Max Rank

i've got a ranking Measure that is going onto a guage tile.  Getting the rank works great but in order to make my guage as meaningful as possible, i need to calculate what the Max Ranking is.  This will therefore show on the guage where you rank sits.  Being 10th out of 1000 means a lot more than being 10th of 11.

So if i place the Rank measure into a matrix, i can see values from 1 to 84.  If i change the filter, now its 1 to 192.  What i'm looking for is a method to return that max value (84 or 192 respectively).  Anyone know of a trick to do this?

  • Anonymous's avatar
    Anonymous
    9 years ago

    Coming back to this fresh i've come up with the solution.  Here is what worked:

     

    Graph Gauge Min = maxx(
    	values('Dim - RegionNames'[RegionName]), 
    	[EBIT Per FTE]
    )

7 Replies

  • DoubleJ's avatar
    DoubleJ
    Solution Supplier

    Hi Anonymous

     

    I assume your rank is a calculated column in your table that looks similar to this one:

     

    This measure calculates the max rank

    MaxRank = 
    CALCULATE(
    	MAX(Ranks[Rank]),
    	ALL(Ranks))

    you then can use it in your gauge

     

    Hope this helps!

    JJ

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi DoubleJ no not at all actually.  My rank is a measure.  The rank measures themselves look something like:

       

      Rank EBIT Per FTE = rankx(
      	ALLEXCEPT('Lab List', 'Lab List'[Division]),
      	[EBIT Per FTE]
      	,
      	,
      	DESC
      )

      The reason they are variable is the location selection can influcence what level the ranks are based on and higher order selections can reduce the number of locations considered in the ranking measure.

       

      • v-huizhn-msft's avatar
        v-huizhn-msft
        Microsoft Employee

        Hi Anonymous,

        Even though your rankx is a measure, you can still use the formula to create measure as I tested.

        MaxRank = CALCULATE(MAX(Table[Rank EBIT Per FTE]),ALL(Table))
        
        ---If there is a filter for the [Rank EBIT Per FTE] measure.
        
        MaxRank = CALCULATE(MAX(Table[Rank EBIT Per FTE]),ALLSELECTED(Table))


        Please feel free to ask if you have other issue.

        Best Regards,
        Angelia