Forum Discussion
Debtors Days DAX Calculation
- 5 years ago
Hi deniseg ,
'Month Year Date'[Date] is the date column of a marked date table. And Try the following formula:
Average Receivables = CALCULATE( AVERAGE('AR v AP Database'[Amount]), DATESINPERIOD( 'Month Year Date'[Date], LASTDATE('AR v AP Database'[Date]), -2, MONTH ), FILTER( ALL('AR v AP Database'), 'AR v AP Database'[AR v AP] = "AR" ), GROUPBY('AR v AP Database','AR v AP Database'[AR v AP]) )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
a / b * c is not equal to a / (b * c). Your formula is syntactically invalid on top of that...
Debtor Days = (Average Receivables in a Period) / (Revenue of current month * Number of Days in the Period.
What's more, everything should be relative to the period. What does 'Revenue of current month' do in there?
- deniseg5 years agoRegular Visitor
Thank you for your response. I am really confused with this one. Do you have a suggestion? Thank you.
- v-kkf-msft5 years ago
Community Support
Hi deniseg ,
'Month Year Date'[Date] is the date column of a marked date table. And Try the following formula:
Average Receivables = CALCULATE( AVERAGE('AR v AP Database'[Amount]), DATESINPERIOD( 'Month Year Date'[Date], LASTDATE('AR v AP Database'[Date]), -2, MONTH ), FILTER( ALL('AR v AP Database'), 'AR v AP Database'[AR v AP] = "AR" ), GROUPBY('AR v AP Database','AR v AP Database'[AR v AP]) )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- deniseg5 years agoRegular Visitor
Thank you, this worked for me!