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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Not statement within Conditional Column

Hey!

 

I have a campaign UTM that contains the what I need the same code which is PMAX and PLA.  I am trying to seperate these and below is an Example what I am aiming for 

 

PMAX= Campaign UTM Contains PMAX but NOT PLA

PLA= Campaign UTM contains PLA but NOT PMAX

 

I am trying a custom column with the below code but doesn't seem to be working

 

if Text.Contains([Campaign],"PMAX") <> Text.Contains([Campaign] ,"PLA") then "PMAX"
else "null"

 

Not sure where I am going wrong but any help is appreciated !

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

if Text.Contains([Campaign],"PMAX") and not Text.Contains([Campaign] ,"PLA") then  "PMAX"

else if not Text.Contains([Campaign],"PMAX") and Text.Contains([Campaign] ,"PLA") then  "PLA"

else "undefined"

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

thanks @lbendlin that worked!

v-pgoloju
Community Support
Community Support

Hi @Anonymous,

 

Just following up to check if the solution shared by our Super User @lbendlin  helped resolve your issue. If you're still facing difficulties or need further assistance, please let us know — we’re here to help!

If the response addressed your query, we kindly request you to mark it as Accepted Solution and click Yes if you found it helpful. This supports others in the community as well.

 

Best regards,

Prasanna Kumar

lbendlin
Super User
Super User

if Text.Contains([Campaign],"PMAX") and not Text.Contains([Campaign] ,"PLA") then  "PMAX"

else if not Text.Contains([Campaign],"PMAX") and Text.Contains([Campaign] ,"PLA") then  "PLA"

else "undefined"

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.