How to fold

Options
emate
emate Dataiku DSS Core Designer, Neuron 2020, Registered, Neuron 2021, Neuron 2022 Posts: 91 ✭✭✭✭✭✭

Hi All,

Is there a way to fold the data as In attached example?

When I'm using "fold multiple columns" It doesnt work beacuse first I'm folding it by units - it is giving me correct result, but when I'm adding as a next step fold by sales it is multiplying my rows again. And the idea is to fold the data by units in sales at the same time to end up with each unique row (COL1 to COL6) * numbers of dates (column) to the left.

Thanks,
M

Best Answer

Answers

  • duphan
    duphan Dataiker, Registered Posts: 32 Dataiker
    Options

    Hello

    You will need to use the "Fold multiple columns with pattern".

    I attach the steps to follow, note that my column's names are not exactly the same as your, so in your case the pattern for the first step will be UNITS\s(.*)

  • emate
    emate Dataiku DSS Core Designer, Neuron 2020, Registered, Neuron 2021, Neuron 2022 Posts: 91 ✭✭✭✭✭✭
    Options

    Thanks for your help!

  • dzi_mchi
    dzi_mchi Registered Posts: 2 ✭✭✭
    Options

    Hi,

    I'm facing the same problem as emate but with two more variables. I mean, if I take his example, I have also units, sales but also quantity and date. I tried to do the same steps you proposed but I think it's not that simple. I don't know what to put in the expression of step 3.

    If anyone can help me please ,

    Thanks,

    d

Setup Info
    Tags
      Help me…