Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Shuchi_08
Starting Member
1 Post |
Posted - 2010-11-26 : 09:27:06
|
Hi,I have a financial cube and i have to calculate Daily Sales Outstanding as : Number of Days between the selected month last date and the earliest transaction date when cummulative sum of Revenue from last date of the month till the date where sum revenue <= the debt amount for the date . e.g On 31/12/2009 my debt amount = 2,500,000 31-Dec-09 30-Nov-09 15-Oct-09 31-Oct-09 Revenue 1,000,000 1,000,000 500,000 1,0000 Total revenue 1,000,000 2,00,000 2,500,000 4,000,000No of Days 31 30 16On 15/Oct/09 cummulative revenue is 2,500,000 which equals my debt amount on that dayCount of Days = 31 + 31 + 16 = 76 Days.In other words Sum Revenue from the selected date backwards until sum total equals or exeeds the total to date balance of the debtors.Any help will be highly appreciated .If i haven't explained clearly enough or if you need more information then please let me know.Thanks in advance . Shuchi. |
|
|
|
|
|
|