Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
User Required only last 4 months of the data in a pivot table?
How to do it in Expression by using set Expression
as well as how to do it in dimension by using date field???
sum({$<Datefield={">=$(=Date(addmonths(Max(date(today(), 'MMM-YYYY')), -4), 'MMM-YYYY'))}>} Amount)
=sum({<YourDatefield={'>=$(DATE(Monthstart(max(Date),-4)),'DD-MM-YYYY')) <=$(=monthend(max(Date)))'}>}Sales)
try this
sum({<Date={">=$(=AddMonths(makedate(max(year),max(month)),-4))"},year=,month=>}sales)
or try this
sum({<datefield={">=$(=monthstart(max(datefield),-4))<=$(=monthend(max(datefield),-1))"},year=,month=,quarter=>}sales)