Forum Discussion
Different results using variable instead of measure
- 6 years ago
Hi Anonymous ,
You may refer to the links:
https://community.powerbi.com/t5/Desktop/var-different-result/td-p/283143 ,
https://community.powerbi.com/t5/Desktop/VAR-different-result-than-without-it/td-p/518723,
https://radacad.com/caution-when-using-variables-in-dax-and-power-bi .
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi v-xicai
Thank you for your reply! Unfortunately I still couldn't understand what is happening. You said:
While for the separate measure [After Snapshot ID ], values are calculated within the scope in which they are written, and then the result of them is stored and used in the rest of the expression of [After Avg Time Profile], which is the filter context.
So if I understand this correctly, [After Snapshot ID] has been calculated beforehand and its result is being used to filter [After Avg Time Profile]. But doesn't that mean that since I have the ALL(...) clause, I would always get the correct result and be able to filter out the values I need?
Hi Anonymous ,
You may refer to the links:
https://community.powerbi.com/t5/Desktop/var-different-result/td-p/283143 ,
https://community.powerbi.com/t5/Desktop/VAR-different-result-than-without-it/td-p/518723,
https://radacad.com/caution-when-using-variables-in-dax-and-power-bi .
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.