cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
DSmith4 Regular Visitor
Regular Visitor

IF / OR statement help

Hello, 

 

I have a dataset with a list of vendor numbers to exclude. If the vendor number is on the list I will be excluding it, however, one of those vendor numbers I want to include some of the values, but not all.

 

I am trying to make a statement like this

IF(NOT(ISBLANK('vendor'))) OR IF ('vendor' = "103055" AND ('material' = "Truck")), "include","exclude"

 

Basically, IF the vendor is blank include the value, BUT also include values if vendor is 103055 and material is truck.

 

Is this possible?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Super User I
Super User I

Re: IF / OR statement help

You can use && and || operators. Something like this:

Column = IF(NOT(ISBLANK(Table[vendor])) || (Table[vendor] = 103055 && Table[material] = "Truck"), "Include", "Exclude")

 

Kind regards

Djerro123

-------------------------------

If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.

Keep those thumbs up coming! 🙂


Did I answer your question? Mark my post as a solution!
Kudo's are appreciated and considered a motivation.

Proud to be a Datanaut!

View solution in original post

2 REPLIES 2
HamiltonVT Member
Member

Re: IF / OR statement help

What are the values you are trying to include? An example of your data would be very useful here!

Super User I
Super User I

Re: IF / OR statement help

You can use && and || operators. Something like this:

Column = IF(NOT(ISBLANK(Table[vendor])) || (Table[vendor] = 103055 && Table[material] = "Truck"), "Include", "Exclude")

 

Kind regards

Djerro123

-------------------------------

If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.

Keep those thumbs up coming! 🙂


Did I answer your question? Mark my post as a solution!
Kudo's are appreciated and considered a motivation.

Proud to be a Datanaut!

View solution in original post

Helpful resources

Announcements
Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors