Hi,
I'm using the below code to retrieve amounts on the last posting date.
LastPeriodSelected = CALCULATE ([FinanceAmountMeasure],
FILTER ('Date', 'Date'[Date] = max('Consolidated Accounts'[PostingDate])))
I have a filter on the visual on the current year and selected months.
My question is: How to I change the code, so that I can get amounts from the last posting date from the previous year (same date previous year)? For example if the last posting date of 2021 was 29/12/2021 then I would like to retrieve the amounts on 29/12/2020.
I have tried sameperiodlastyear, but can't get that to work when combined with "max".
Thank you,
I'm using the below code to retrieve amounts on the last posting date.
LastPeriodSelected = CALCULATE ([FinanceAmountMeasure],
FILTER ('Date', 'Date'[Date] = max('Consolidated Accounts'[PostingDate])))
I have a filter on the visual on the current year and selected months.
My question is: How to I change the code, so that I can get amounts from the last posting date from the previous year (same date previous year)? For example if the last posting date of 2021 was 29/12/2021 then I would like to retrieve the amounts on 29/12/2020.
I have tried sameperiodlastyear, but can't get that to work when combined with "max".
Thank you,