Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello.
I want to compare this week data with LY same week data but not full last year week
Like this week we have data till yesterday i.e 2020-03-18 (Wednesday) so for Last year it should show data till Wednesday only.
Hi,
This can be achieved by creating four variables as follows:
Variable 1: weekstart(max(Date).
Variable 2: Max(Date)
Variable 3: Addyears(weekstart(max(Date),-1)
Variable 4: Addyears(Max(Date),-1)
Now we can use these variables in set analysis and compare this year's current week trend and last year's current week trend.
e:g: For Current Year current week:- Sum({<Date={">=$(Variable1)<=$(Variable2)"}Sales)
For Last Year Current Week :- Sum({<Date={">=$(Variable3)<=$(Variable4)"}Sales).
I used Variables because those can be re used,if you want you can use the direct expressions instead of variables in the set analysis.
Hope it helps
Thanks & Regards...!!!
Thanks for replying . Some how variables are correct but set analysis is not working it gives zero which is wrong