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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
webbj
Helper I
Helper I

Calculate with Filters from different columns

So thanks to @DataInsights I've been using the following to calculate the average based on mulitple filters from a single column in a table. However i'm now trying to figure out how to find calculate the average based on two conditions from two columns in the same table shown in second code segment.

 

Measure =
CALCULATE (
    AVERAGE ( Combined[Response Time (Days)] ),
    Combined[Type]
        IN {
        "CT - Change Request (10)",
        "CT - General Support (5)",
        "CT - New Implementation (10)",
        "CT - Technical Issue/Fault (10)"
    }
)

 

Here is an example of what I've tried, I've tried others as well however it either displays 'blank' or the code errors.

Measure = 
CALCULATE (
    AVERAGE ( 'CT Combined Extracts'[Response Time (Days)] ),
    'CT Combined Extracts'[Type]
        IN {
        "CT - Technical Issue/Fault (10)"
    },
    'CT Combined Extracts'[Service]
        IN {
        "CT - Case Access"
    }
)

 

Any help would be much appreciated.

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @webbj 
It should work. What error codes are you getting. Note that this is an "AND" condition between the two conditions so double check the spelling and make sure the two conditions actually intersect.

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @webbj 
It should work. What error codes are you getting. Note that this is an "AND" condition between the two conditions so double check the spelling and make sure the two conditions actually intersect.

oops it you were right - there was a double space in the data extract and I had only put one space in. Thankyou!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.