Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I want to compare a period of this year with the same period last year.
For example: Jan, Feb, Mrt 2014 vs Jan, Feb, Mrt 2013.
I have now the following, but it doesn't work proper:
sum({$<Date = {">=$(=Date(addyears(Min(Date), -1)))"}, Date -= {"<=$(=Date(addyears(Max(Date), -1)))"}>}visitors)
It is on expressions level and has to work wiht selections.
Can you give a suggestion what to change?
Thanks,
Marc
Hi Dariusz,
I look into your answer. And use these functions, but it didn't work. I must also use selections on Date,MonthYear, Year.
Can anyone help my furhter?
Regards,
Marc
try this:
sum({$<Date = {">=$(=Date(addyears(Min(Date), -1)))<=$(=Date(addyears(Max(Date), -1)))"}>}visitors)
This works for the date selction, but not for the MonthYear, Year selection. Is that also possible?
Soory, the date function look likes it work but it doesn't. It gives the same result as current year selection.
Marc,
the best idea for those type of questions is to attach sample application. It will let somebody to see your data model, data, etc. It is much easier to help.
Regards
Darek
The one which works now is:
sum({$<date = {">=$(=date(addyears(Min(date), -1))) <=$(=date(addyears(Max(date), -1)))"},
Marc,
try to replace sum({$<date... with sum({1<date...
you are almost there , you have to ignore the selections , since you already used the field named "Date" see below
sum({$<Date = {">=$(=Date(addyears(Min(Date), -1)))<=$(=Date(addyears(Max(Date), -1)))"},Year=,Month=,Quarter=>}visitors)