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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ezequiel
Microsoft Employee
Microsoft Employee

AND-OR on New Column

Hi

 

I'm trying to add a new column and using the following definition trying to combine OR/AND

 

= Table.AddColumn(#"Added Conditional Column1", "Compliance", each if (([Request Status] = "Pending" or [Request Status] = "Assigned to" or [Request Status] = "Processing" or [Request Status] = "Pending Approval" or [Request Status] = "On Hold" or [Request Status] = "Pending DocuSign" or [Request Status] = "Pending Recipient Information") and [Compliant Request]="NO") then "NO" else "YES")

 

but doesn't seems to work. I have on the column "Request Status" the value the value "Assigned to" and on the column "Compliant Requests" the value "NO" and I'm getting "YES" as result, when the expected result should be "NO".

 

Any clue on this?

 

thanks,

1 ACCEPTED SOLUTION

Hello @ezequiel

 

Not sure about the syntax of your AND / OR

 

The correct syntax is : AND(X;Y) / OR (X;Y) 

 

Maybe try to add a new column and then type in : 

 

Column = IF(AND([Compliant Request]="NO";OR([Request Status] = "Pending";OR([Request Status] = "Assigned to";OR([Request Status] = "Processing";OR([Request Status] = "Pending Approval";OR([Request Status] = "On Hold";OR([Request Status] = "Pending DocuSign";[Request Status] = "Pending Recipient Information")))))));"NO";"YES")

Not sure about the result matching what you are looking for (we need more details to help you)

EDITED 16h24

View solution in original post

3 REPLIES 3
v-yuta-msft
Community Support
Community Support

Hi ezequiel ,

 

Please check if there're some unprintable characters in your column. Use trim to remove those character and try again.

 

Regards,

Jimmy Tao

Hi Jimmy...I checked and there are not unprintable chars. Any other suggestion? Do you see any issue on the logic I built?

 

Thanks,

Hello @ezequiel

 

Not sure about the syntax of your AND / OR

 

The correct syntax is : AND(X;Y) / OR (X;Y) 

 

Maybe try to add a new column and then type in : 

 

Column = IF(AND([Compliant Request]="NO";OR([Request Status] = "Pending";OR([Request Status] = "Assigned to";OR([Request Status] = "Processing";OR([Request Status] = "Pending Approval";OR([Request Status] = "On Hold";OR([Request Status] = "Pending DocuSign";[Request Status] = "Pending Recipient Information")))))));"NO";"YES")

Not sure about the result matching what you are looking for (we need more details to help you)

EDITED 16h24

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.