# Can I make this row splitter with less nodes

**URL:** <https://forum.knime.com/t/can-i-make-this-row-splitter-with-less-nodes/22063>\
**Category:** KNIME Analytics Platform\
**Created:** [March 26, 2020, 12:59pm UTC](https://forum.knime.com/t/can-i-make-this-row-splitter-with-less-nodes/22063 "2020-03-26T12:59:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![StudentEt](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/cab0a1/32.png) [@StudentEt](https://forum.knime.com/u/StudentEt)\
**Post date:** [March 26, 2020, 12:59pm UTC](https://forum.knime.com/t/can-i-make-this-row-splitter-with-less-nodes/22063/1 "2020-03-26T12:59:52Z")

</div>

Hello KNIME Forum,

I have a dataset Temperature [Temperature.zip](https://forum.knime.com/uploads/short-url/yGYZ44iTTMUKiLg8cRLAGOlARUD.zip) (16.0 KB)

I want to have the temperatures of each year not under each other but next to each other ( in different columns) I managed to do this with many nodes and I want to know if there is a more elegant way to get this done (Check the column aggregation for the final result).  
[KNIME\_RowSplitterEfficiency.knwf](https://forum.knime.com/uploads/short-url/4wo4gcUtQsE40GOQbg1ZvgYFobp.knwf) (32.0 KB)

Hopefully some knows how to make this workflow more elegant with less nodes!

---

<div class="post-metadata">

**Author:** ![nemad](https://forum-cdn.knime.com/user_avatar/forum.knime.com/nemad/32/53702_2.png) [@nemad](https://forum.knime.com/u/nemad)\
**Post date:** [March 26, 2020, 1:15pm UTC](https://forum.knime.com/t/can-i-make-this-row-splitter-with-less-nodes/22063/2 "2020-03-26T13:15:48Z")

</div>

Hi @StudentEt,

I believe what you are looking for is the [Pivoting](https://kni.me/n/ebLbPp7VLbV4apta) node.  
It’s admittedly quite complex but once you figured it out, it’s an enormously powerful tool.  
In your case, you will want to select the month and day as grouping columns, the year as pivoting column and then select e.g. “First” as aggregation on temp.  
Tip: In the advanced settings (at the bottom of the dialog) you have some options for specifying the naming scheme of the result columns. In your case, I’d set “Aggregation name” to “Keep original name(s)”.

Cheers,

Adrian

---

<div class="post-metadata">

**Author:** ![StudentEt](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/cab0a1/32.png) [@StudentEt](https://forum.knime.com/u/StudentEt)\
**Post date:** [March 26, 2020, 2:07pm UTC](https://forum.knime.com/t/can-i-make-this-row-splitter-with-less-nodes/22063/3 "2020-03-26T14:07:29Z")

</div>

Thank you very much! The only problem now is that the dates are not in chronic order anymore. Is there a way to keep the dates in a chronic all order? So the first row is January 1st 2012 the second row is January 2nd 2012 etc.

---

<div class="post-metadata">

**Author:** ![nemad](https://forum-cdn.knime.com/user_avatar/forum.knime.com/nemad/32/53702_2.png) [@nemad](https://forum.knime.com/u/nemad)\
**Post date:** [March 26, 2020, 2:12pm UTC](https://forum.knime.com/t/can-i-make-this-row-splitter-with-less-nodes/22063/4 "2020-03-26T14:12:19Z")

</div>

Provided your rows were ordered before the pivoting, you can set the “Retain row order” option in the Advanced settings.  
Alternatively, you can also use the [Sorter](https://kni.me/n/gwwIZ5c5EYsJErci) after the pivoting to change the row order.

Cheers,  
Adrian

---

<div class="post-metadata">

**Author:** ![StudentEt](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/cab0a1/32.png) [@StudentEt](https://forum.knime.com/u/StudentEt)\
**Post date:** [March 26, 2020, 2:18pm UTC](https://forum.knime.com/t/can-i-make-this-row-splitter-with-less-nodes/22063/5 "2020-03-26T14:18:34Z")

</div>

You are the best! Thank you very much!

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [April 2, 2020, 2:18pm UTC](https://forum.knime.com/t/can-i-make-this-row-splitter-with-less-nodes/22063/6 "2020-04-02T14:18:36Z")

</div>

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