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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
JDartz
Regular Visitor

Calculate Average of Column with Two Filters

Hey, everyone! 

Brand new to Power BI; tired looking for this solution but can't seem to find it.

 

Basicially I'm trying to create an avearge measure of a specific column, but with two filters engaged for the same column. 

I have been able to calculate the Average in that column for ONE filter, but can't seem to figure out how to calculate for two filters. Here is the formula for the one filter calculation that works:

AVG TX IO =

CALCULATE (
    AVERAGE ( '2024 Raw Data (2)'[TX] ),
    FILTER ( '2024 Raw Data (2)', '2024 Raw Data (2)'[ Location] = "In-Office" )
)
1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Modify the measure to

AVG TX IO = CALCULATE(AVERAGE ( '2024 Raw Data (2)'[TX] ),'2024 Raw Data (2)'[ Location] = "In-Office"||'2024 Raw Data (2)'[ Location] = "Out-Office")

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Modify the measure to

AVG TX IO = CALCULATE(AVERAGE ( '2024 Raw Data (2)'[TX] ),'2024 Raw Data (2)'[ Location] = "In-Office"||'2024 Raw Data (2)'[ Location] = "Out-Office")

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Yes! Taking the FILTER function out and adding || worked! Much appreciated!!

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
ryan_mayu
Super User
Super User

maybe try to use && to apply the second fileter

AVG TX IO =

CALCULATE (
    AVERAGE ( '2024 Raw Data (2)'[TX] ),
    FILTER ( '2024 Raw Data (2)''2024 Raw Data (2)'[ Location] = "In-Office"  && xxxx )
)

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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