Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I would need some in calculating a running total.
Monthname(Date) | Product | Start of month Balance | sum(sales) | sum(payout) | End of month Balance |
Jan-22 | A | 0 | 100 | 0 | 0 + 100 - 0 = 100 |
Feb-22 | A | 100 | 150 | 50 | 100 + 150 - 50 = 200 |
Mar-22 | A | 200 | 50 | 200 | 200 + 50 - 200 = 50 |
Jan-22 | B | 0 | 200 | 0 | 200 |
Feb-22 | B | 200 | 50 | 100 | 200 + 50 - 100 = 150 |
Mar-22 | B | 150 | 100 | 50 | |
Apr-22 | B | 80 | 50 |
I have a dataset with Date, Sales and Payout. I want to calculate on a product level (with date of course). I will have for each product at the start of the first month has 0 sales at first then we add the sales of that month and then we substract the payout. This new value will be the starting value of the next month and so on. Can you anyone help me? I tried with above/rangesum but I didn't get the expected values
Any help would be appreciated