Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
could you please tell me why my calculation is not returning the expected result?
in the table the Registered measure should take the date on each column as the max date and then calculate back 12 months from that date , according to the expression: like this:
how can I fix it?
try this
sum({< Date={">=$(=max([Period ID])-12)<=$(=max([Period ID]))"}>} Sales)
or
=Sum({$<Date={">=$(=Date(MonthStart(AddMonths(Max(Date),-11)),'YYYYMMDD'))<=$(=Date(MonthStart(AddMonths(Max(Date),0)),'YYYYMMDD'))"}>} Distinct Sales)
or
sum({<dateField={">=$(=date(addmonths(today(),-11)))<=$(=date(today()))"}>}Sales)
or
=sum({<Date = {'>=$(=vVar1)<=$(=vVar)'}>}Sales)
vVar1
=AddMonths(Date,-12)
vVar
=AddMonths(Date,0)