Do the right pivoting (configuration)?

Hello community,

in my original table, all the months are in column. Now i want to shift them in lines with the corresponding mothly values of my KPIs.

In the attached file you can see the input table and my expectet output.

Pivoting.xlsx (14.5 KB)

Can you pls help me to solve this problem :-)?

Hi @ARock1980

This seemed like a simple operation at first, but quickly became more complicated.
Here’s the workflow I came up with. I’d love to see if anyone else here can come up with something simpler.

2 Likes

Hi @ARock1980

This is an other approach. Where I assumed that the columns (except for the KPI columns) have a constant value (as in your example). some_pivoting.knwf (47.6 KB)


gr. Hans

2 Likes

@elsamuel thank you for the pretty cool solution :slight_smile:

But one more question. in my original date i have more. My problem is, that the “KPI” is only in one line and i dont know how to adjust your workflow that the entry is in every line…
2022-06-10 23_19_51-Collected results - 8_15 - Loop End

i created a further table for it
Pivoting update.xlsx (15.9 KB)

Can you pls help me once again?

Off the top of my head there are 2 options.

  1. You can either add a Group Loop that processes one Location at a time:

or

  1. you can use a Missing Value node after the Column Appender node, which is configured to apply the value from the previous row to any rows that have missing values:

Whether or not these will continue to work for you depends on your data. If you have a complex data set you should share it in the beginning.

3 Likes

Thank you for your help @elsamuel :+1:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.