Forum Discussion
Filter precedence in DAX functions
- 2 years ago
Anonymous
For this case, the result is correct, and identical to the FILTER case. If we use the same logic, then also here COUNTAX will return a scalar value hence all conditions will be meaningless.
I guess the dynamics of applying the filters is that filters coming from CALCULATE conditions are applied, then the table is evaluated and the expression is calculated. In my failing case, the condition coming from CALCULATE was overpowered by the ALL wrapped around the table name in the COUNTAX, hence cleared the condition filter.
I hope my guessing is right!
A worthy update: The below also worked:
Anonymous
For this case, the result is correct, and identical to the FILTER case. If we use the same logic, then also here COUNTAX will return a scalar value hence all conditions will be meaningless.
I guess the dynamics of applying the filters is that filters coming from CALCULATE conditions are applied, then the table is evaluated and the expression is calculated. In my failing case, the condition coming from CALCULATE was overpowered by the ALL wrapped around the table name in the COUNTAX, hence cleared the condition filter.
I hope my guessing is right!
- Anonymous2 years agoNot applicable
Hi AhmadBakr ,
I think the conclusions of your follow up post below the thread are completely correct and we are basically all in agreement on the conclusions of our discussion, so I think there is absolutely no problem with what you are saying!
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.