Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
jstein91694
Frequent Visitor

Create two "filtered" columns utilizing a measure.

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.

SH Input (mmBTU) =
CALCULATE('GAHP-Trane-Canada'[GAHP Gas Input (mmBTU)],
'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).

I am trying to create a second column which slightly changes the filter which would look like this;

DHW Input (mmBTU) =
CALCULATE('GAHP-Trane-Canada'[GAHP Gas Input (mmBTU)],
'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)

I can successfully create the first column, but by creating the second I have a circular dependency. I was wondering if there is a way to create both columns without a circular dependency since all I am doing is filtering a measure.




1 ACCEPTED SOLUTION
v-eachen-msft
Community Support
Community Support

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
    )
)

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

1 REPLY 1
v-eachen-msft
Community Support
Community Support

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
    )
)

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors