Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have data as below:
* INVOICE_ID - Invoice number
* SALE_DATE - The date of invoice issue
* SALE_VALUE - Invoice value
* DUE_DATE - The date invoice should be paid
* PAYMENT_DATE - the real date when invoice was paid
I need to calculate two values:
1. Balance of upaid invoices at the end of each day - it is simple, I already did is
2. The Number of last sale days (0 should not be ignored) which cover current balance of invoices (hard to explaid, I attach excel example)
Example:
What's your expected output
My data model is:
I need to calculate three values:
1. VALUE OF DAILY SALE
2. BALANCE OF INVOICES AT THE END OF THE DAY
3. THE NUMBER OF DAYS SALE OF WHICH COVERS THE BALANCE
I calculated points 1 and 2.
I don't know how to count point 3.
DATA MODEL