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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jbotero
Frequent Visitor

Extract colors from column

Hello everyone.

 

I have a table with several columns, one of them is the description of the product, which, among other things, has a color in the text. For example: Short sleeve shirt for men blue size M.

 

I want to know if I can specify a conditional to extract only colors onto another column with DAX or Query Editor.

 

The color is not always on the same position, so trimming words is not an option.

 

Thanks for your kind help.

 

Best regards,

Juan

1 ACCEPTED SOLUTION
shebr
Resolver III
Resolver III

Hi @jbotero

 

If you go into your Power BI editor, add a conditional column there is an operator that allows you to specify 'contains'. You could use this to pick out the colours and set the value in a new column. See image.

 

Let me know how you get on.

 

Thanks

 

shebr

 

conditional.JPG

View solution in original post

3 REPLIES 3
shebr
Resolver III
Resolver III

Hi @jbotero

 

If you go into your Power BI editor, add a conditional column there is an operator that allows you to specify 'contains'. You could use this to pick out the colours and set the value in a new column. See image.

 

Let me know how you get on.

 

Thanks

 

shebr

 

conditional.JPG

jbotero
Frequent Visitor

Thanks!! Worked great.

PietroFarias
Resolver II
Resolver II

Is there any possibility in creating a column with the colors that already exists? In this way, it is easier to develop something.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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