Forum Discussion

Mseddi's avatar
Mseddi
New Member
3 years ago
Solved

HELP _ Including measure in calculated column

Hi guys,   I have 3 table : * Sales table including invoice date * collection table including clearing invoice date, net due date, Collection Period as calculated column (clearing date-Net due da...
  • tamerj1's avatar
    3 years ago

    Hi Mseddi 

    Please try

    Average collection previous year =
    VAR InvoiceDate = 'Sales'[Date invoice]
    RETURN
    AVERAGEX (
    FILTER (
    'Collection',
    'Collection'[Date] <= InvoiceDate
    && 'Collection'[Date] >= InvoiceDate - 365
    ),
    'Collection'[Collection Period]
    )