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.  Subtotal Based on Dynamic Date Ranges

    Employee
    Posted 07-23-2016 04:02

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

    Originally posted by: peterr

    Hi,

    I'm trying to set up a graph to calculate customer rebates. The problem I'm having is that each rebate agreement can have different start and end dates, for example:

    Customer Number = 1
    Rebate Agreement No. = R1000
    Rebate Agreement Start Data = 01/01/2016
    Rebate Agreement End Data = 31/12/2016

    Customer Number = 2
    Rebate Agreement No. = R1001
    Rebate Agreement Start Data = 01/01/2016
    Rebate Agreement End Data = 28/02/2016

    Customer Number = 2
    Rebate Agreement No. = R1003
    Rebate Agreement Start Data = 01/04/2016
    Rebate Agreement End Data = 30/04/2016

    I have an extract all all invoices for the year, but how do I dynamically get a subtotal of the invoice value based on the customer, rebate agreement Start and End Date?

    Thanks

    Peter


  • 2.  RE: Subtotal Based on Dynamic Date Ranges

    Employee
    Posted 07-23-2016 10:07

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

    Originally posted by: stonysmith

    Attached is an example that should do what you need.
    I over-built it a bit, adding some checks for valid date ranges,etc.

    Rebate Invoice Examnple.brg

    Note: This method will work fine for a smaller numbers of records, but if you get into the area of millions of Invoices, millions of Rebates, this method will struggle because of the way memory is handled. One simple way of dealing with huge record numbers here is to segment the data into periods (months, quarters, etc) and process fewer records at a time.


  • 3.  RE: Subtotal Based on Dynamic Date Ranges

    Employee
    Posted 10-14-2016 01:54

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

    Originally posted by: peterr

    Hi,

    Apologies, I needed to upgrade my version of Lavastorm before I could open this which took an unexpected amount of time, but this is great (and actually very simple as well)!!

    Thanks!

    Peter