Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi there,
I want to write;
sum (sales)
filter1 : addmonths -2 (2 months before today)
filter2 : country=germany
can you help me write tihs with set analysis?
thanks.
Perhaps this?
Sum({<DateField = {">=$(=AddMonths(Date(Today()), -2)) <=$(=Date(Today()-1))"}, country = {'germany'}>}sales)
May be this
Sum({<country = {'germany'}, Date = {"$(=Date(AddMonths(Today(), -2)))"}>}sales)
what is the $ for ?
and my date filter is in 'YYYYMM'
so is it :
=Sum({<country = {'Germany'}, Date = {"$(=Date(AddMonths(Today(), -2),'YYYYMM'))"}>}sales)
(error)
=Sum({<country = {'Germany'}, Num_Month = {$(=Max(Num_Month)-2)}>}sales)
This may work if you have months in numeric.
Like 1,2,3,4,....12