Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm desperately trying to catch last sales date from two months back. Since it's May now, I shoud find last date from March. This is how I tried to do that:
sum(Month(AddMonths(Date(Today()),-2)), 'M/D/YYYY'), {<[Snapshot Date] = date(max({1}[Snapshot Date])},Year = {$(=only(Year))} )
not sure to understand as you have 3 field, year, month and snapshot date and I don't know the meaning;
if d is the date field, m the month field and y the year field
the max date of two months ago maybe
=max ({$<m={"$(=month(addmonths(Today(),-2)))"},y={"$(=year(addmonths(Today(),-2)))"}>} d)
If I'm reading this right to get the last day of a month 2 months ago use...
Date(MonthEnd(Max(date),-2))
...with date being your date field. Just change the number to the number of months ago desired.