Data Prep Question

kinho
kinho Registered Posts: 2 ✭✭✭

I have a data table, and I know the final format it needs to be in. I'm struggling with how to get there ... Was hoping someone can help me, ideally with a visual recipe.

Here is the format of the table now:

Ranking 2000 2004 2008

1 USA Japan Ireland

2 Ireland USA USA

3 Japan Ireland France

Here is the format I want it to be in:

Country Average Rank

USA 1.66

France 3

Ireland 2

Japan 2

Best Answer

  • Mateusz
    Mateusz Dataiku DSS Core Designer, Neuron 2020, Registered, Neuron 2021, Neuron 2022 Posts: 91 ✭✭✭✭✭✭
    Answer ✓

    Hi @kinho

    You can do it with: Prepare recipe + Group by.

    First go to Prep recipe and "Fold multiple columns" (2000, 2004, 2008) then use "group by" with column being column with country prefix and set field aggregation for Rank to "Avg"

    dss_1.pngdss_2.png

    dss_3.png

    Thanks

    Mateusz

Answers

Setup Info
    Tags
      Help me…