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.
I have just created a measure which incorporates data from two different queries. I am now trying to use this measure to create two new columns using a slightly different filter based on existing columns. I am able to create the first of which by doing the following.
Solved! Go to Solution.
Hi @jstein91694 ,
You could refer to this blog: https://www.sqlbi.com/articles/understanding-circular-dependencies/
“Nevertheless, by using CALCULATE, we are asking to transform the current row context into a filter context and this modifies the dependency list.”
You could edit your both columns with FILTER().
SH Input (mmBTU) =
CALCULATE (
'GAHP-Trane-Canada'[GAHP Gas Input (mmBTU)],
FILTER (
'GAHP-Trane-Canada',
'GAHP-Trane-Canada'[GAHP Gas Use DELTA (cf)] > 0
&& 'GAHP-Trane-Canada'[0H AH Supply Air (F)] > 100
&& 'GAHP-Trane-Canada'[0E Hyd Supply Tank (F)] < 100
)
)
DHW Input (mmBTU) =
CALCULATE (
'GAHP-Trane-Canada'[GAHP Gas Input (mmBTU)],
FILTER (
'GAHP-Trane-Canada',
'GAHP-Trane-Canada'[GAHP Gas Use DELTA (cf)] > 0
&& 'GAHP-Trane-Canada'[0H AH Supply Air (F)] > 100
&& 'GAHP-Trane-Canada'[0E Hyd Supply Tank (F)] > 100
)
)
Hi @jstein91694 ,
You could refer to this blog: https://www.sqlbi.com/articles/understanding-circular-dependencies/
“Nevertheless, by using CALCULATE, we are asking to transform the current row context into a filter context and this modifies the dependency list.”
You could edit your both columns with FILTER().
SH Input (mmBTU) =
CALCULATE (
'GAHP-Trane-Canada'[GAHP Gas Input (mmBTU)],
FILTER (
'GAHP-Trane-Canada',
'GAHP-Trane-Canada'[GAHP Gas Use DELTA (cf)] > 0
&& 'GAHP-Trane-Canada'[0H AH Supply Air (F)] > 100
&& 'GAHP-Trane-Canada'[0E Hyd Supply Tank (F)] < 100
)
)
DHW Input (mmBTU) =
CALCULATE (
'GAHP-Trane-Canada'[GAHP Gas Input (mmBTU)],
FILTER (
'GAHP-Trane-Canada',
'GAHP-Trane-Canada'[GAHP Gas Use DELTA (cf)] > 0
&& 'GAHP-Trane-Canada'[0H AH Supply Air (F)] > 100
&& 'GAHP-Trane-Canada'[0E Hyd Supply Tank (F)] > 100
)
)
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 |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |