Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want get sum(sales) for the following daily and monthly data.
Daily data.
1) at first loading, I want to get 14 days of data from max date of data.
for example, if max date of data is 20150602 then the answer should be from 20150519 to 20150602.
2) if I select the date 20140501 then the answer should be from 20140418 to 20140501
Monthly Data
1) at first loading, I want to get 12 months of data from max date of the month of data.
for example, if max date of data is 20150602 then the answer should be from 201407 to 201506.
2) if I select the month 201405 then the answer should be from 201306 to 201505
That would be really great if you can help me out on this one.
Thank you very much. Your guide made it clear my problem.
Hi, the below linked thread has tons of information on what you are looking for. .
Daily Data Expression:
=Sum({<Date = {"$(='>=' & Date(Max(Date) - 14, 'YYYYMMDD') & '<=' & Date(Max(Date), 'YYYYMMDD'))"}>}Sales)
Monthly Data Expression
=Sum({<Date = {"$(='>=' & Date(AddYears(MonthEnd(Max(Date)), -1), 'YYYYMMDD') & '<=' & Date(MonthEnd(Max(Date)), 'YYYYMMDD'))"}>}Sales)
HTH
Best,
Sunny
Thank you. That helped a lot.
Thank you very much. Your guide made it clear my problem.
Hi Young,
If Sunny helped you to solve the problem, give the correct answer credit to him/her.