Hitachi Vantara Pentaho Community Forums
Results 1 to 8 of 8

Thread: cumulative sum - group by

  1. #1
    Join Date
    Dec 2013
    Posts
    5

    Default cumulative sum - group by

    hi,

    we face unique/strange behavior when we use Group By -with cumulative sum -

    we calculate YTD for a period of 1st month to 12th month.

    on 8th month, we do not have some codes/records

    but on 9th month, we have those codes/records . but 'cumulative sum' gives wrong value.

    is it a known issue/bug ?

    or what is the alternative ?

    more details


    1. we have the following fields
    -- account_code
    -- month
    -- department
    -- division
    -- store_id

    2. account_code (some account code records/missing in the month of august)

    3. cumulative_sum goes wrong value.

    how do we approach this issue.

    thanks,
    arul

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

    Default

    Have you configured your Group By correctly?
    Have you sorted the data with a Sort step before?
    -- Mick --

  3. #3
    Join Date
    Dec 2013
    Posts
    5

    Default

    HI Mick,

    yes, we have sorted.
    and select the respective fields in group by.

    thanks,

    Quote Originally Posted by Mick_data View Post
    Have you configured your Group By correctly?
    Have you sorted the data with a Sort step before?

  4. #4
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Either you made a mistake when configuring the Group By step, or you discovered a bug.
    Why don't you try to reproduce the error with a Data Grid and attach a demo here for inspection?
    You will have to do that anyway, if you want to file a bug report.
    So long, and thanks for all the fish.

  5. #5
    Join Date
    Dec 2013
    Posts
    5

    Default cumulative sum error

    Here is my sample input data and output data.

    test_sum.csv = input
    test_sum1_result.csv=output.

    test_sum.ktr = cumulative sum group by test

    after august, the value goes wrong. how do i correct this ?

    thanks,

    Quote Originally Posted by marabu View Post
    Either you made a mistake when configuring the Group By step, or you discovered a bug.
    Why don't you try to reproduce the error with a Data Grid and attach a demo here for inspection?
    You will have to do that anyway, if you want to file a bug report.
    Attached Files Attached Files

  6. #6
    Join Date
    Dec 2013
    Posts
    5

    Default

    hi,

    basically, we need to keep the same ytd (actual_sum) in august, sep, oct, nov, dec.
    we know that, there are no records available in those months. but, how to bring those previous month values. (just for ytd).

    thanks,

  7. #7
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Make sure your sort fields match your accumulation group: id2, id3, year, month.
    So long, and thanks for all the fish.

  8. #8
    Join Date
    Dec 2013
    Posts
    5

    Default

    Hi Marabu,

    Yes, it works. thanks.
    but, if we add more years, like 2012,2011, have some issues.
    anyhow it is my mistake.
    thanks,

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.