cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
OzzieFrog Member
Member

Cannot apply operator & to types Logical and Text

Hi folks,

 

I have obviously been staring at this for too long and am too tired, so can I please ask for your assistance to identify why I'm getting the "we cannot apply operator & to types Logical and Text" to the following formula:

 

if Text.Contains([Location_Name],"WP") = true & Text.Clean([Job_Title]) = "Associate" then "Associate" else if Text.Contains([Location_Name],"WP") = true & Text.Clean([Job_Title]) = "Process Control" & Text.Contains([Union],"AU") then "Process Controller" else if Text.Contains([Location_Name],"WP") = true & Text.Clean([Job_Title]) = "Process Control" & Text.Contains([Union],"CF") then "Power Station Controller" else [Job_Title]

 Thanks in advance.

OF

1 ACCEPTED SOLUTION

Accepted Solutions
Stachu Super Contributor
Super Contributor

Re: Cannot apply operator & to types Logical and Text

'&' is concatenate, I think you need 'and'

https://docs.microsoft.com/en-us/powerquery-m/operators

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

View solution in original post

2 REPLIES 2
Stachu Super Contributor
Super Contributor

Re: Cannot apply operator & to types Logical and Text

'&' is concatenate, I think you need 'and'

https://docs.microsoft.com/en-us/powerquery-m/operators

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

View solution in original post

OzzieFrog Member
Member

Re: Cannot apply operator & to types Logical and Text

@Stachuyou were right, thank you very much. I was obviously too out of it to even pick it up 🙂

Helpful resources

Announcements
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Top Kudoed Authors
Users Online
Currently online: 320 members 3,041 guests
Please welcome our newest community members: