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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
SarahHope
Helper II
Helper II

Syntax for Calculated Column to Filter results from three fields using OR logic

Hello!

I'm brand new to Power BI. I'm trying to create a calculated column containing a filter for three other columns in the same data sheet using OR logic.


I want a calculated column showing me all changes that will need post implementation review.  I want to name that column "PIR" and I want a Boolean result in that column

 

Change Type = "Emergency Change"

OR
Expedited = True

OR

Resulted in Outage = True

 

I've tried a number of configurations and tried to follow examples I have found in help forums.  But I'm just not getting it. 

This is what I have for starters:

PIR = FILTER('Full SharePoint Export'[Expedited]=True || 'Full SharePoint Export'[Change Type] = "Emergency Change" || 'Full SharePoint Export'[Resulted in Outage] = TRUE)
My syntax is incorrect.
I could really use a little help.
Thanks!
Sarah

 

1 ACCEPTED SOLUTION

@FreemanZ - Thank you SO much!  That gets me much closer. 

What is the significance of the TRUE, TRUE, FALSE at the end?

I like to understand why I am doing what I'm doing.

 

Apparently, since the 'Change Type' field is not boolean and the other two fields are,  FILTER is giving me an error.

So, I am trying to make another calculated column called "Emergency" that returns "True" for any change where Change Type = "Emergency Change"

 

 I have tried this:

Emergency = CONTAINS(FILTER('Full SharePoint Export'[Change Type]),"Emergency Change")
But am getting "too few arguements were passed to the FILTER function."
 
I'll keep researching and let you know if I figure it out.  I'd be happy for advice too!
 
Thanks,
Sarah

View solution in original post

3 REPLIES 3
FreemanZ
Super User
Super User

hi @SarahHope 

try like:

PIR = 
IF('Full SharePoint Export'[Expedited]=TRUE || 'Full SharePoint Export'[Change Type] = "Emergency Change" || 'Full SharePoint Export'[Resulted in Outage] = TRUE, TRUE, FALSE)

@FreemanZ I've got it!

 

Emergency = CONTAINSSTRING('Full SharePoint Export'[Change Type],"Emergency Change")
This works!

 

I also learned that the field for "Resulted in Outage" looked like True/False, but it wasn't.  I changed it. 

 

Everything works.

I'm still wondering what the TRUE, TRUE, FALSE) at the end of the statement you provided means.

That's not urgent, but I would like to know.  

 

Also, I want to accept the solution with a caveat - Can I do that?

"This solution works as long as all the fields are True/False"

@FreemanZ - Thank you SO much!  That gets me much closer. 

What is the significance of the TRUE, TRUE, FALSE at the end?

I like to understand why I am doing what I'm doing.

 

Apparently, since the 'Change Type' field is not boolean and the other two fields are,  FILTER is giving me an error.

So, I am trying to make another calculated column called "Emergency" that returns "True" for any change where Change Type = "Emergency Change"

 

 I have tried this:

Emergency = CONTAINS(FILTER('Full SharePoint Export'[Change Type]),"Emergency Change")
But am getting "too few arguements were passed to the FILTER function."
 
I'll keep researching and let you know if I figure it out.  I'd be happy for advice too!
 
Thanks,
Sarah

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.