Formula for Combining Rows and Adding Columns

Options

Hello,

I am trying to accomplish a New DataSet using the Magic ETL where I combine multiple rows that have the same data in one column, but then create new columns for the data that isnt the same in other columns. To better explain, I have provided an example here.

(Please see screenshot below) I have tried using "Group By" tile for the Food column and combine using a ",". I then used a "Split Column" to split the food by comma delimiter to make multiple columns.

My problem is that since the food has no specific order, I end up with different food names in different columns (for example I would want all apples in the first new column but banana gets put in there because its first row for Person B).

I have an image of what I am trying to achieve below. Any help would be great, thanks in advance.

Best Answer

Answers

  • ColemenWilson
    Answer ✓
    Options

    You'll need to use the pivot/unpivot tiles in magic ETL. More info here: https://domo-support.domo.com/s/article/360044951294?language=en_US

    Please let me know if you get stuck and I can help out!

    If I solved your problem, please select "yes" above

  • nstephens88
    Options

    Thank you,

    The "Pivot" tile almost gets me to where I need, however, in the configuration for "Pivot" for #5 "Select what column values will populate this new column" I wanted it to be "Food", which is also what I need to select for #1 "Select the column that has the column labels you want" It appears you cannot select the same columns for those two options (however that is what I need).

  • nstephens88
    Options

    I was actually able to resolve this issue by duplicating the "Food" column with the Select Columns tile and using Join Data tile. I was able to do this with the Pivot tile successfully now that there was 2 duplicate food columns. Thank you for your help.

  • ColemenWilson
    Options

    Awesome!

    If I solved your problem, please select "yes" above