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
craigjlane
Frequent Visitor

Taking two conditions and if both are true returning a new value

I have the following table:

 

Shaggy Rogers.png

 

for which I have created two conditional columns which are as follows:

Condition 1 = IF(
    MDD[Test 10] = "True" && MDD[Out] = "True" && MDD[Less than -10] = "True", "YES!", "")
 
Condition 2 = IF(
    MDD[Test 7] = "True" && MDD[In] = "True" && MDD[Less than -10] = "True", "YES!", "")
 
Both are text data types.

I need to get a result of "PATTERN" to return based on "YES!" being in true for Condition 1 and Condition 2.  As you can see, those results are true for Shaggy Rogers, however, I cannot get the return of "PATTERN".  I created the column: 

Con1and2 = IF(MDD[Condition 1] = "YES!" && MDD[Condition 2] = "YES!", "PATTERN", "")

However that doesn't work.  If I change "&&" to "||" it works, but that is only based on one of the two conditions being met.   I need both conditions to be met.  

I'm also curious why the table adds a new row for each name with every new column.  I feel like that might have something to do with the problem as it may not be recognizing that the two conditional results for Shaggy Rogers are the same person.  

I am lost so any help is greatly appreciated.
 
1 REPLY 1
lbendlin
Super User
Super User

 I created the column: 

Con1and2 = IF(MDD[Condition 1] = "YES!" && MDD[Condition 2] = "YES!", "PATTERN", "")

However that doesn't work.

Please be more specific. Did you get an error message, or a wrong result?

 

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

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.