Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi guys!
I am suffering with a performance issue for a measure.
It is derived from several others, so I'll paste all the ones that are calculated for the last one to exist.
All the previous are not affecting the performance when brought in a table (for instance).
Do you have any advices to save processing, maybe using different syntaxes...
Solved! Go to Solution.
@Anonymous,
You can use variable to avoid double calculation in your measure:
Excess Stock = VAR result = [Valid Stock Value] - [TargetStockValue] - [No Future Use] RETURN IF ( result < 0, 0, result )
@Anonymous,
Same principle applies. You want to avoid repeating measure because it calculates every time you mention it. Use variable so the result is stored in the memory
Stock OK = VAR validStock = [Valid Stock Value] VAR targetStock = [TargetStockValue] RETURN SWITCH ( TRUE (); validStock >= targetStock; targetStock; validStock )
@Anonymous,
You can use variable to avoid double calculation in your measure:
Excess Stock = VAR result = [Valid Stock Value] - [TargetStockValue] - [No Future Use] RETURN IF ( result < 0, 0, result )
@Anonymous
This one is still a bit slow, though... any ideas about it?
@Anonymous,
Same principle applies. You want to avoid repeating measure because it calculates every time you mention it. Use variable so the result is stored in the memory
Stock OK = VAR validStock = [Valid Stock Value] VAR targetStock = [TargetStockValue] RETURN SWITCH ( TRUE (); validStock >= targetStock; targetStock; validStock )
@Anonymous
@Anonymous wrote:@Anonymous,
You can use variable to avoid double calculation in your measure:
Excess Stock = VAR result = [Valid Stock Value] - [TargetStockValue] - [No Future Use] RETURN IF ( result < 0, 0, result )
Awesome! This reduced the calculation time from 4 minutes to 10 secs. Thanks!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
93 | |
77 | |
65 | |
50 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |