Deal with odd & even rows separately

Hi,

I have a table like following:

Jan Feb Mar Apr
1 2 3 4
May Jun Jul Aug
5 6 7 8

And I want odd rows to be column 1, even rows to be column 2. How can I transform this table?

Hi @Jocelyn,

Transpose, Unpivoting, Sorter and Joiner are the nodes to solve this:

odd-even.knwf (33.4 KB)

To select odd and even column headers (which are actually the rows in the original table) in the Unpivoting nodes I have used these regex patterns:
For even columns: Row\d*[02468]
For odd columns: Row\d*[13579]

:blush:

2 Likes

Thank you so much sir! It’s very impressive and practical!

1 Like

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