Forum Discussion

Ale's avatar
Ale
Resolver II
7 years ago
Solved

Column output based on another column value and time function

I have a table like that: I'm comparing values from CurrentMonth vs PreviousMonth (based on the month selected in the slicer) for all of the KPIs, and based on that, I assign a specific resu...
  • PattemManohar's avatar
    7 years ago

    Ale Please try this as a "Measure"

     

    Result = SWITCH(SELECTEDVALUE(Test155[KPIName]),
                    "A",IF(_KeyMeasures[Test155CurrMonth]>=_KeyMeasures[Test155PrevMonth]*1.10,1,0),
                    "B",IF(_KeyMeasures[Test155CurrMonth]>=_KeyMeasures[Test155PrevMonth]*1.03,1,0),
                    "C",IF(_KeyMeasures[Test155CurrMonth]>=_KeyMeasures[Test155PrevMonth],1,0),
                    0)