Forum Discussion
DSO Countback method (DAX Calcualtioin)
Hi Krinec,
Thank you for the reply.
This measure still gives me the wrong calculated value for DSO, with this measure the DSO value is 2015 days for selected monthyear as December2024. It should be 163 according to DSO calcualtion done in excel.
- Anonymous1 year agoNot applicableHi Pooja_Dasani_98 ,Thank you for reaching out to Microsoft Fabric Community Forum.Please try the below measure:DSO_Countback_Mine =VAR SelectedYearMonth = MAX('Calendar (AsOfDate)'[yy-month])
VAR ARBalanceStart = CALCULATE(SUM('Calendar (AsOfDate)'[Total AR]),'Calendar (AsOfDate)'[yy-month] = SelectedYearMonth)
VAR SalesHistory =FILTER (ADDCOLUMNS (FILTER (ALL('Calendar (AsOfDate)'),'Calendar (AsOfDate)'[yy-month] <= SelectedYearMonth),"Revenue", CALCULATE(SUM('Calendar (AsOfDate)'[Total sales (Total PPM Revenue)])),"DaysInMonth", CALCULATE(MAX('Calendar (AsOfDate)'[Days]))),[Revenue] > 0)
VAR TableWithLoop =ADDCOLUMNS (SalesHistory,"RunningAR",VAR Revenue = [Revenue]VAR Days = [DaysInMonth]VAR PriorRows =FILTER (SalesHistory,'Calendar (AsOfDate)'[yy-month] > EARLIER('Calendar (AsOfDate)'[yy-month]))VAR ARUsed = SUMX(PriorRows, [Revenue])VAR CurrentRemaining = ARBalanceStart - ARUsedRETURNIF (CurrentRemaining >= Revenue,Days,DIVIDE(CurrentRemaining, Revenue) * Days))
VAR Result =SUMX (FILTER (TableWithLoop,VAR Revenue = [Revenue]VAR Days = [DaysInMonth]VAR PriorRows =FILTER (SalesHistory,'Calendar (AsOfDate)'[yy-month] > EARLIER('Calendar (AsOfDate)'[yy-month]))VAR ARUsed = SUMX(PriorRows, [Revenue])VAR Remaining = ARBalanceStart - ARUsedRETURN Remaining > 0),[RunningAR])
RETURN ResultIf your problem has been solved already, it would be great if you could share the steps or the final solution you followed, so others facing a similar issue can benefit from it as well.
Please mark the helpful reply and accept it as solution , it will be helpful for other members of the community who have similar problems as yours to solve it faster .
Thank you very much for your kind cooperation!
Regards,
B Manikanteswara Reddy
- Anonymous1 year agoNot applicable
Hi Pooja_Dasani_98 ,
We wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Please don't forget to give a "Kudos " – I’d truly appreciate it!
Regards,
B Manikanteswara Reddy
- Anonymous1 year agoNot applicable
Hi Pooja_Dasani_98 ,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Please don't forget to give a "Kudos " – I’d truly appreciate it!
Regards,
B Manikanteswara Reddy