Forum Discussion

Kfausch's avatar
Kfausch
Helper II
8 years ago
Solved

Measure for Accounts Receivable Aging

Hello,   I am currently using "0-30 Days = SUMX(FILTER('Cust_ Ledger Entry', 'Cust_ Ledger Entry'[Due Date]<=TODAY() && 'Cust_ Ledger Entry'[Due Date]>TODAY()-30),'Cust_ Ledger Entry'[Receivable Re...
  • Stachu's avatar
    8 years ago

    the measure needs to relate to a filter context coming from visualization/slicer. Assuming the month on the bar chart will be based on Cust_ Ledger Entry'[Due Date] I would try the following:

    0-30 Days = 
    VAR LastDay= MAX( Cust_ Ledger Entry'[Due Date]) //should return last date in selected period
    RETURN
    SUMX(
        FILTER(
            'Cust_ Ledger Entry', 
            'Cust_ Ledger Entry'[Due Date]<=LastDay && 'Cust_ Ledger Entry'[Due Date]>LastDay-30
        ),
        'Cust_ Ledger Entry'[Receivable Remaining Amount($)]
    )