Forum Discussion

kennylch's avatar
kennylch
Helper I
2 years ago
Solved

Column give incorrect result

The last column "Healthy Level" gives incorrect result. As you can see the formula is like this. The text column created based on the value in a measure.    The formula for the column is like this ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi kennylch ,

     

    Thanks Idrissshatila , Ronald123  and SamInogic  for the quick reply. I have some other thoughts to add:
    Since your parameter in SWITCH is a measure, and you create a calculated column, the result is unexpected. Measures are dynamic, and they're contextually influenced, so the results of the measure you see in the visual may not match the results of the measure that it's in a calculated column. So we need to create a measure:

     

    Measure Healthy Level = SWITCH(
        True(),
        [Healthy]>5, "Above Healthy",
        [Healthy]>0, "Healthy Level",
        "Unhealthy Level"
    )

    Then set the filter in the filter pane.

     

    Best Regards,

    Neeko Tang

    If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly.