"Pivot operator"

onyourmarkonyourmark Member, University ProfessorPosts:10University Professor
edited June 2019 inHelp
Hello. We are trying to use the pivot operator.

We want to collapse the rows that have the same date with summing of the values of the variables.

So that a table like this
Date Variable1 Variable2 Variable3 Variable4
2012/04/20 5 2 2 6
2012/04/20 6 5 2 6
2012/04/20 5 8 6 2
2012/04/21 5 7 2 2
2012/04/21 8 6 2 6
2012/04/22 8 4 8 9
2012/04/22 5 5 5 8

Would become this:
Row Labels Sum of Variable1 Sum of Variable2 Sum of Variable3 Sum of Variable4
4/20/2012 16 15 10 14
4/21/2012 13 13 4 8
4/22/2012 13 9 13 17
Grand Total 42 37 27 39

Can anyone suggest what to do to get this?
Thanks!

Answers

  • awchisholmawchisholm RapidMiner Certified Expert, MemberPosts:458Unicorn
    Hello

    You need to use the aggregate operator

    Here's an example






    <宏/ >












    Sun Apr 01 09:09:06 BST 2007



















    <连接from_op =“聚合”摇来摇去m_port="example set output" to_op="Sort" to_port="example set input"/>








    regards

    Andrew
Sign InorRegisterto comment.