Forum Discussion

voidbydefault's avatar
1 year ago
Solved

Calculating receivable aging dynamically

Hi,   I want to calculate "aged balances" dynamically in a way that dashboard users have two options to change the overdue days being overdue days as option 1) [Invoice Due Date] and TODAY(); and 2...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Thanks for the reply from ajohnso2 and johnt75 , please allow me to provide another insight:

    Hi, voidbydefault 
     

    Could you please let me know if the responses from ajohnso2 and johnt75 have resolved your issue? If they have, kindly accept their answers as the solution

    I share the same views as ajohnso2 and johnt75, and I’ve created examples based on their perspectives to aid your understanding. Below are my sample data:

    1.First, ajohnso2's proposal:

    This modifies the final step of your approach by adjusting the measures:

    xDays Outstanding = DATEDIFF(MAX('data_006_custBal'[Invoice Due Date]), [Aging Cutoff Date], DAY)
    

    Here are the final results:

    2.Second,  johnt75 's proposal:

    Firstly, create the following two measures:

    Measure 1 = DATEDIFF(MAX('data_006_custBal'[Invoice Due Date]),MAX('data_006_custBal'[Report Date]),DAY)
    Measure 2 = DATEDIFF(MAX('data_006_custBal'[Invoice Due Date]),TODAY(),DAY)
    

    Then, create the parameters:

     

    Rename them accordingly and create the slicer:

    Parameter = {
        ("Report Date", NAMEOF('data_006_custBal'[Measure 1]), 0),
        ("Today", NAMEOF('data_006_custBal'[Measure 2]), 1)
    }
    


     

    Here are the final results:

     

    I hope my explanations help you grasp their proposals. Both solutions are excellent ideas, and I trust you will find them useful.

     

    Please find the attached pbix relevant to the case.

     

    Best Regards,

    Leroy Lu


     

     

  • voidbydefault's avatar
    1 year ago

    First, thanks to johnt75 , ajohnso2 , and Anonymous for your time in trying to help. In my unique case, I realized I need to calculate invoice aging at row level so I added four columns in my data table as:

     

     

    Then created a parameter with its slicer:

    test_OS_Days = {
        ("xDays Outstanding from Report Date", NAMEOF('data_006_custBal'[xAging Bucket Report Days]), 0),
        ("xDays Outstanding from Today", NAMEOF('data_006_custBal'[xAging Bucket Today Days]), 1)
    }
     
    This enabled the functionality I was aiming to achieve.