Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
hnguy71
Memorable Member
Memorable Member

Calculating Days Sales Outstanding (DSO) historical

Hi All.

I have quite a challenge and I'm not sure how to proceed. I have a sample dataset that returns me the total billed for the current period and all payments for prior periods (up to 24 months). I then also have another table that stores my balance for each respective period.  The idea is to count backwards and see how long it would take to clear the balance. 

Here's a sample of the DSO table:


PostedDate     Account            Value                   Offset  OffsetDate    Days

12/01/2019TOTBIL_M$13,804,541012/31/201931
12/01/2019TOTBIL_M_01$13,775,181-111/30/201930
12/01/2019TOTBIL_M_02$13,508,124-210/31/201931
12/01/2019TOTBIL_M_03$14,758,989-309/30/201930
12/01/2019TOTBIL_M_04$22,432,463-408/31/201931
12/01/2019TOTBIL_M_05$16,792,839-507/31/201931
12/01/2019TOTBIL_M_06$14,739,866-606/30/201930
12/01/2019TOTBIL_M_07$16,059,744-705/31/201931
12/01/2019TOTBIL_M_08$17,258,471.63-804/30/201930
12/01/2019TOTBIL_M_09$16,539,435.4-903/31/201931
12/01/2019TOTBIL_M_10$17,423,565.15-1002/28/201928
12/01/2019TOTBIL_M_11$20,244,143.57-1101/31/201931
12/01/2019TOTBIL_M_12$17,862,394.82-1212/31/201831
12/01/2019TOTBIL_M_13$17,070,963.62-1311/30/201830
12/01/2019TOTBIL_M_14$19,914,972.9-1410/31/201831
12/01/2019TOTBIL_M_15$17,279,826.09-1509/30/201830
12/01/2019TOTBIL_M_16$22,278,329.97-1608/31/201831
12/01/2019TOTBIL_M_17$19,736,538.17-1707/31/201831
12/01/2019TOTBIL_M_18$20,112,045.52-1806/30/201830
12/01/2019TOTBIL_M_19$18,488,243.3-1905/31/201831
12/01/2019TOTBIL_M_20$14,345,520.47-2004/30/201830
12/01/2019TOTBIL_M_21$15,695,651.51-2103/31/201831
12/01/2019TOTBIL_M_22$15,038,192.85-2202/28/201828
12/01/2019TOTBIL_M_23$17,446,928.09-2301/31/201831
12/01/2019TOTBIL_M_24$15,419,503.28-2412/31/201731
11/01/2019TOTBIL_M$13,775,181011/30/201930
11/01/2019TOTBIL_M_01$13,508,124-110/31/201931
11/01/2019TOTBIL_M_02$14,758,989-209/30/201930
11/01/2019TOTBIL_M_03$22,432,463-308/31/201931
11/01/2019TOTBIL_M_04$16,792,839-407/31/201931
11/01/2019TOTBIL_M_05$14,739,866-506/30/201930
11/01/2019TOTBIL_M_06$16,059,744-605/31/201931
11/01/2019TOTBIL_M_07$17,258,471.63-704/30/201930
11/01/2019TOTBIL_M_08$16,539,435.4-803/31/201931
11/01/2019TOTBIL_M_09$17,423,565.15-902/28/201928
11/01/2019TOTBIL_M_10$20,244,143.57-1001/31/201931
11/01/2019TOTBIL_M_11$17,862,394.82-1112/31/201831
11/01/2019TOTBIL_M_12$17,070,963.62-1211/30/201830
11/01/2019TOTBIL_M_13$19,914,972.9-1310/31/201831
11/01/2019TOTBIL_M_14$17,279,826.09-1409/30/201830
11/01/2019TOTBIL_M_15$22,278,329.97-1508/31/201831
11/01/2019TOTBIL_M_16$19,736,538.17-1607/31/201831
11/01/2019TOTBIL_M_17$20,112,045.52-1706/30/201830
11/01/2019TOTBIL_M_18$18,488,243.3-1805/31/201831
11/01/2019TOTBIL_M_19$14,345,520.47-1904/30/201830
11/01/2019TOTBIL_M_20$15,695,651.51-2003/31/201831
11/01/2019TOTBIL_M_21$15,038,192.85-2102/28/201828
11/01/2019TOTBIL_M_22$17,446,928.09-2201/31/201831
11/01/2019TOTBIL_M_23$15,419,503.28-2312/31/201731
11/01/2019TOTBIL_M_24$17,218,360.07-2411/30/201730

 

Here's a sample of my balance table:

Date                   Balance

12/01/2019$30,901,690.63
11/01/2019$30,348,830.63

 

As you can see it for November it takes about a little over 2 months to equal or become greater than the balance. I takes about 6.23 days into month 3. The estimated DSO for that balance would then come out to 67.23 (31 + 30 + 6.23):
dso_sample.png

 

Using practically the same data for December, we can see that it takes about 3 months to clear as well:
dso_sample_2.png

This time, it takes around 7.62 days from the 3rd month to clear the balance which gives us a total of 68.62 (30 + 31 + 7.62)

 

@Ashish_Mathur , I believe you had a similar post on your blog. If possible, could you help me solve this? I have included a pbix with sample data for anyone to play around with. 

 

Thanks in advanced!

 

PBIX: https://1drv.ms/u/s!An8CCFsOzw0ug02Bwwp417v2Xf-P?e=SFaB6E

 



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
1 ACCEPTED SOLUTION
hnguy71
Memorable Member
Memorable Member

Turns out I was able to figure it out using a round-about method but it works. I'll keep this thread open for a few days if anyone has a better solution:

dso_finished.png

 



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

View solution in original post

3 REPLIES 3
LifeLongLearner
Frequent Visitor

@hnguy71 can u pls share the pbix file.

Thanks in Advance. 

hnguy71
Memorable Member
Memorable Member

Turns out I was able to figure it out using a round-about method but it works. I'll keep this thread open for a few days if anyone has a better solution:

dso_finished.png

 



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
Anonymous
Not applicable

Can you please share the PBIX file where you implemented DSO calculation.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.