Forum Discussion
Ale
7 years agoResolver II
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...
- 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)
PattemManohar
7 years agoCommunity Champion
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)dd96
3 years agoFrequent Visitor
Hello I am trying to write similar logic and not sure but can not reference column name in IF clause.
I am not sure what is _KeyMeasure here , is it a new table name ?