Forum Discussion
Column give incorrect result
- Anonymous2 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.
Hi,
As per our understanding, you want to include the rows where Net Qty is equal to 5 in the "Above Healthy" category. To do this, we can update the DAX formula for the "Healthy Level" column like this:
Healthy Level =
SWITCH(
TRUE(),
'Table'[Net Qty] >= 5, "Above Healthy",
'Table'[Net Qty] > 0, "Healthy Level",
"Unhealthy Level"
)
Please refer to the screenshot given below,
Thanks!
sorry. what i want is to use Healthy Qty. I forgot to point to Healthy Qty column instead. But if you change at ur end and you will notice is wrong as well
You may refer to the attached photo. As you can see i update the formula point to "heathy" column. The Heathy Level text column still doesnt display the correct text