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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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