Forum Discussion

jbotero's avatar
jbotero
Frequent Visitor
8 years ago
Solved

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

  • 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

     

3 Replies

  • shebr's avatar
    shebr
    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

     

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