Forum Discussion

MCacc's avatar
MCacc
Icon for Helper IV rankHelper IV
2 years ago

Dynamic measure to compare values based on selection

I have to create a measure that compares values in columns based on selection from a slicer. 

 

The selection is multiple choice and doesn't follow a specific order.

 

I have the follow measure which creates a Rank and it works fine, it returns incremental number based on the selection. 

 

What I struggle to achieve is to write a measure that basically compares the values in the columns: 

My arrow has to change, goes up and down based on the value on the cell in the column next to it.

 

Do you have any suggestion? 

 

Thanl you

2 Replies

    • MCacc's avatar
      MCacc
      Icon for Helper IV rankHelper IV

      Thank you so much for your input but unfortunately it doesn't work.

       

      I tried the function both in a measure and in a calcolated column but the values returned are blank.

       

      This is what I did: 

      MEASURE 1 = MAX(TABLE[SEVERITY]

       

      and then:

      CALCULATE([MEASURE], OFFSET(-1, ALLSELECTED(TABLE[DIMENSION1_VISUAL]))

       

      * Field SEVERITY is a string

       

      * DIMENSION_VISUAL is the field I use in the rows for my table visual

       

      Of course I can have N values of SEVERITY for my DIMENSION1_VISUAL, but as soon as I select all my filters the rows become 1.

       

      Thank you again, for your kind suggestion. But please let me know if you any other ideas