Forum Discussion

vrv's avatar
vrv
Helper II
3 years ago
Solved

simple measure

hi all, i need a simple measure DAX expression that checks a bit field and gets a value of "GOOD" when the field tested is 1 AND "BAD" if the tested fields is 0. All my common sense attempts failed...
  • saurabhkudale96's avatar
    3 years ago

    Hello vrv ,
     If you need to have the result in the below format, you need to create a Calculated column. You are not able to enter the column name because you are trying to create a measure. And a column cannot be used in a measure.

    Result = SWITCH(Table_Name[column_name], 1, "GOOD", 0, "BAD")

    OR

    Result = IF(Table_Name[column_name] = 1, "GOOD", "BAD")