Forum Discussion

deniseg's avatar
deniseg
Regular Visitor
5 years ago
Solved

Debtors Days DAX Calculation

Dear PowerBi Community,   I would like to ask for your help to calculate on DAX the Debtors Days.   Debtor Days = (Average Receivables in a Period) / (Revenue of current month * Number of Days in...
  • v-kkf-msft's avatar
    v-kkf-msft
    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,
    Winniz

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.