Forum Discussion
Switch/IF condition ignores zero
- 6 years ago
Hi Anonymous ,
You also could refer to below calculated column for details.
Column = switch(TRUE(),ISBLANK('Table'[Hour]),0,'Table'[Hour]>=0 && 'Table'[Hour]<4,1,'Table'[Hour]>=4,0)You could refer to BLANK-is-caught-as-0-in-Columns for details.
Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi az38 , Thanks for response.
I understand the problem, in my condition I initially put criteria for blank() =0 (where 0 is taken as blank), so it has taken as zero, even if I try to change the criteria to multiple times it was taking into effect.
So I changed zero values to 1 in power query(Where zero values needs to taken into consideration not blank values) and calculated with switch condition with same expression it worked.
Hi Anonymous ,
You also could refer to below calculated column for details.
Column = switch(TRUE(),ISBLANK('Table'[Hour]),0,'Table'[Hour]>=0 && 'Table'[Hour]<4,1,'Table'[Hour]>=4,0)
You could refer to BLANK-is-caught-as-0-in-Columns for details.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.