Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi,
I have a measure
Solved! Go to Solution.
Variables aren't really variable, they're constants. They're only calculated once when you define them, so they're useful for storing the results of a calculation if you want to refer to it multiple times but if you need to perform the same calculation multiple times with different filter contexts then you cannot use variables for that.
Also, a couple of general points. You shouldn't use SUMMARIZE to add calculated columns to a table, you should use SUMMARIZE just to give the static columns and wrap it in ADDCOLUMNS to add the calculations.
And you shouldn't use equality operators to compare to blank as that can give unexpected results, as 0 equals blanks. Instead of variable <> BLANK(), use NOT(ISBLANK(variable)).
Variables aren't really variable, they're constants. They're only calculated once when you define them, so they're useful for storing the results of a calculation if you want to refer to it multiple times but if you need to perform the same calculation multiple times with different filter contexts then you cannot use variables for that.
Also, a couple of general points. You shouldn't use SUMMARIZE to add calculated columns to a table, you should use SUMMARIZE just to give the static columns and wrap it in ADDCOLUMNS to add the calculations.
And you shouldn't use equality operators to compare to blank as that can give unexpected results, as 0 equals blanks. Instead of variable <> BLANK(), use NOT(ISBLANK(variable)).
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 52 | |
| 34 | |
| 34 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 64 | |
| 64 | |
| 41 | |
| 27 | |
| 24 |