Forum Discussion
Excellove15
Sep 17, 2024Iron Contributor
Dax referenced measures causes performance issues
Hi, I have created a dax measure as below: VT_Targetunitrate_2 = SUMX ( Accruals, IF ( [Accrual cost source_2] = "Target", [Switch Cost] ) ) I also tried using calculate but i am not abl...
Lorenzo
Sep 20, 2024Silver Contributor
Hi Excellove15
Can you please help how to improve performance Not with my DAX knowledge. Though, you seem to SWITCH here and there so, just in case:
- https://blog.crossjoin.co.uk/2023/11/26/if-switch-and-the-effect-of-dax-variables-on-strict-eager-evaluation/n
- https://blog.crossjoin.co.uk/2022/09/19/diagnosing-switch-related-performance-problems-in-power-bi-dax-using-evaluateandlog/
Also, and no idea if DAX behaves the same but with Excel when you do something like:
=SWITCH( TRUE,
A1 = 1, 1,
A1 = 2, 2,
A1 = 3, 3,
"Custom"
)ALL conditions are evaluated