Forum Discussion
dax filtering
Hello,
please can someone help me understand why these two filters produce slightly different results (I would have thought they are doing the same job but I am obviously misunderstanding something)?
filter 1 =
CALCULATE (
COUNT ( table2[id] ),
table2[gender] >= 1
&& table2[gender] <= 3
&& table2[zone] >= 5
&& table2[zone] <= 8
)
filter 2 =
CALCULATE (
COUNT ( table2[id] ),
table2[gender] >= 1
&& table2[gender] <= 3
&& table2[zone] == 5
|| table2[zone] == 6
|| table2[zone] == 7
|| table2[zone] == 8
)
Thanks,
A
you are doing a strict comparison using ==, so the condition is true when both sides are equal or blank.
please refer to this article: https://dax.guide/op/strictly-equal-to/
2 Replies
- FowmySuper User
you are doing a strict comparison using ==, so the condition is true when both sides are equal or blank.
please refer to this article: https://dax.guide/op/strictly-equal-to/