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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
jburbano
Frequent Visitor

Multiple filter criteria in CALCULATE function returns with error

CAn't seem to find a solution for this:

 

DevAverageDuration = DIVIDE(
CALCULATE(
SUM(Builds[buildDuration]),
Builds[buildEnv]="DEV" && Builds[build.result]="succeeded"
),
[DevBuildsSuccesses],
0
)
Returns an error:
 
"The expression contains multiple columns but only a single column can be used in a True/False expression that is used as a table filter expression"  I have to filter by both criteria as I am doing an average which is the DevBuildsSuccess measure.
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

Try

 

 

DevAverageDuration = DIVIDE(
CALCULATE(
SUM(Builds[buildDuration]),
Builds[buildEnv]="DEV" , Builds[build.result]="succeeded"
),
[DevBuildsSuccesses],
0
)

 

or

DevAverageDuration = DIVIDE(
CALCULATE(
SUM(Builds[buildDuration]),filter(Builds,
Builds[buildEnv]="DEV" && Builds[build.result]="succeeded"
)),
[DevBuildsSuccesses],
0
)

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

Try

 

 

DevAverageDuration = DIVIDE(
CALCULATE(
SUM(Builds[buildDuration]),
Builds[buildEnv]="DEV" , Builds[build.result]="succeeded"
),
[DevBuildsSuccesses],
0
)

 

or

DevAverageDuration = DIVIDE(
CALCULATE(
SUM(Builds[buildDuration]),filter(Builds,
Builds[buildEnv]="DEV" && Builds[build.result]="succeeded"
)),
[DevBuildsSuccesses],
0
)

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.