LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Group Total if Date >

    Employee
    Posted 07-20-2017 08:39

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: jchartrand

    I have an interesting scenario that I am trying to fit into Lavastorm and am hoping the experts can help.

    I have 2 sets of data.

    Set 1
    Code,OrderGuide,Date
    1234,110O,2017-01-23
    1234,120O,2017-05-31
    5678,150O,2017-02-23
    3456,170O,2017-06-31

    etc...

    Set 2
    Code,OrderGuide,Date,Qty
    1234,110O,2016-12-31,2
    1234,110O,2016-12-24,8
    1234,110O,2017-01-24,5
    1234,110O,2017-01-28,3
    1234,110O,2017-02-25,3
    1234,110O,2017-04-24,4
    1234,110O,2017-07-18,9

    As a user, I want to take the total of the quantities of the items in set 2, where the date is greater than the item in set 1. Expected output...

    Code,OrderGuide,Date,TotalQty
    1234,110O,2017-01-23,15
    1234,120O,2017-05-31,9

    Any input would be greatly appreciated!


  • 2.  RE: Group Total if Date >

    Employee
    Posted 07-20-2017 09:04

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: sahmed

    Hi,

    I think there may be a few different ways to achieve this.

    If i understood your requirement correctly the attached graph should show one way. Note i changed your row of data from set 2 with QTY = 9 to have OrderGuide = 120O as looking at your expected output i think that was a type in set 2.

    Hopefully the attached graph helps with your problem.

    Thanks,
    Sadat

    Example2.brg