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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
VrowePPA
Frequent Visitor

Create New Column with If Text Contains parameters

I'm sorry, I have read all the 'text contains' articles and have tried the formulas for my data, but I just can't get my formula to work!

 

I have a table with a field with six possible values:

New Warm, New Hot, New Cold, Existing Warm, Existing Hot, Existing Cold

 

I want to create a visual that just shows me a pie chart of "new" vs "existing". So, I'm trying to create a custom column where If the value is either New Warm, New Hot or New Cold, then just give me a value of "New", else "Existing".

VrowePPA_0-1680490885660.png

 

I've tried formulas for containsstring, contains.text etc.. I always get these two errors.

It doesn't recognise "IF"

VrowePPA_1-1680491113685.png

 

If I add an =, then I get the literal token message

VrowePPA_2-1680491183749.png

 

Thanks in advance for pointing me in the right direction.

 

Vikki

 

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, I am not sure if I understood your question correctly, but please try something like below.

One thing to note is that Uppercase and lowercase has to be exactly the same, when using Power Query Editor.

 

Jihwan_Kim_0-1680493471432.png

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
VrowePPA
Frequent Visitor

Thank you, yes your example is the result I am trying to achieve. Your insutrction helped the formula to run. However, I still get an error: A cyclic reference was encountered during evaluation. 

VrowePPA_0-1680494474819.png

 

Jihwan_Kim
Super User
Super User

Hi, I am not sure if I understood your question correctly, but please try something like below.

One thing to note is that Uppercase and lowercase has to be exactly the same, when using Power Query Editor.

 

Jihwan_Kim_0-1680493471432.png

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.