0

Single column with multiple values to multiple columns - HOW

Hi, 

I have a HubSpot integration, which delivers me within a custom field different values, and I would like to separate them into multiple new columns with functions.

Example

Hubspot field

A;B;C;D

or

B;C;E

Up to 5 different values. I would like to create 5 extra columns named A,B,C,D,E and every time the value shows B or E it shows a 1 in the column as I count the rows later in the dashboard.

I tried this with the switch function but i´m missing wild cards. 

For example in the Column for B

SWITCH(&CustomField,"B","1")

Maybe I miss something important here

 

Thanks for help

 

Ralf

 

 

 

 

2 comments

  • Avatar
    Parker Selman Official comment

    Hi Ralf,


    Thanks for the post! 

    In this case, it's likely best to use IF and CONTAINS to do this for each of your columns. 

    For example, if you're doing this for column A

    IF( CONTAINS( &CustomField,"A"),1,0)

    This should return a 1 if A exists in the record, and 0 if it does not. 

    I hope this helps! Please let me know if you have any questions around this,

    Parker

  • 0
    Avatar
    Ralf

    Hi Parker, you just saved my life. That works 100%. 

     

    Thank you so much. 

Please sign in to leave a comment.