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!
I have a measure choosing 1 out of 4 other measures, depending on what ISFILTERED, like this:
IB =
VAR __IB= If(
ISFILTERED(Age) && ISFILTERED(Duration), [IB_BothFiltered],
if(ISFILTERED(Age),[IB_AgeFiltered],
If(ISFILTERED(Duration),[IB_DurationFiltered],[IB_NeitherFiltered])))
RETURN if(__IB>0,__IB)
The purpose is to choose the alternative which calculates faster, when possible.
Now I am contemplating replacing those 4 measures with 4 VARs within the main measure instead, but what would happen then? Would all 4 VARs be calculated in the background only for one of them to show up, or would only the VAR that that shows up be calculated?
Solved! Go to Solution.
@Martin_Songstad , I think var is evaluated once, even if not used.
refer
https://www.purplefrogsystems.com/blog/2021/09/variables-in-dax/
https://www.sqlbi.com/articles/variables-in-dax/
@Martin_Songstad , I think var is evaluated once, even if not used.
refer
https://www.purplefrogsystems.com/blog/2021/09/variables-in-dax/
https://www.sqlbi.com/articles/variables-in-dax/
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 |
---|---|
51 | |
27 | |
24 | |
13 | |
8 |
User | Count |
---|---|
74 | |
52 | |
47 | |
16 | |
12 |