Hello,
I am trying to calculate the age of my documents by using the date of my documents. So If a user selects January 1st in the Calendar slicer all documents with a date in December should have a month age of 1 and so on.
It is not working and the age of the documents are inacurate. Can anyone assist?
Here are the Calculations:
CurrentYM = YEAR ( MAX ( 'Calendar'[Date] ) ) * 12 + MONTH ( MAX ( 'Calendar'[Date] ) )
CurrentDocumentYM =
IF (
HASONEVALUE( Transactions[DateOfInvoice] ),
YEAR ( MAX ( Transactions[DateOfInvoice] ) ) * 12 + MONTH ( MAX ( Transactions[DateOfInvoice] ) )
)
Month Aging = MAX ( [CurrentYM] - [CurrentDocumentYM],0 )