Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Group by and other fields

  1. #1
    Join Date
    Sep 2011
    Posts
    171

    Default Group by and other fields

    Hello everyone,

    Here is what I have

    Product Name; Number of units; Color
    Table; 20 ; green
    Table; 23; green
    Chair; 12; green
    Chair; 23; green

    Here is what I want

    Product Name; Number of units; Color
    Table; 43; green
    Chair; 35; green

    So what I would like to aggregate by "Product Name" i.e sum up "Number of units" of each product and paste it into table along with Color.

    I tried doing with group by function, but I do not know how to get the "Color" column to go through.You can assume that color never changes.


    Any suggestions?

    Regards,
    Alex

  2. #2
    Join Date
    Apr 2008
    Posts
    1,771

    Default

    Your "Group by" Step:
    in Aggregates Panel:
    Name: Number of Units.
    Subject: Number of Units.
    Type: Sum.

    Name: Color.
    Subject: Color.
    Type: First non-null Value.

    Mick

  3. #3
    Join Date
    Sep 2011
    Posts
    171

    Default

    Thank you! I looked through 2 books and searched internet and could not find.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.