Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi i have 2 fields
date and sales
date:
1/1/2015
2/1/2015,
3/1/2015,
4/1/2015
5/1/2015
6/1/2015
7/1/2015
8/1/2015
9/1/2015
10/1/2015
11/1/2015
12/1/2015
13/1/2015
14/1/2015
15/1/2015
.
.
.
.
30/1/2015
31/1/2015
and sales is for every date like 100,200,300......30000
now my req is for example if select on any one date like 14/1/2015 is wednesday .
if i select on 14/1/2015 means then i want see the sales for only 14/1/2015(wed) and exactly previous week wednesday means (7/1/2015)
it means i want see sales for only selected date and from selected date to exactly one week back to that date
so in the same way if i select 15/1/2015 theni want see salesfor 15/1/2015 and 8/1/2015(even i dont want see data between dates of 15/1/2015 and 8/1/2015) i want see for only 15/1/2015 and 8/1/2015.
i hope u guys understand the question
Hi,
create 2 expression
1st : Sum({<date={"$(=date(max(date)))"}>}Sales)
2nd : Sum({<date={"$(=date(max(date)-7))"}>}Sales)
Note: Carefull with date Format.
Regards
Hi,
Have a look at the applications.
Regards,
Kaushik Solanki
SET DateFormat='DD/MM/YYYY';
in the script header and in the chart,create an expression as below
Sum({<SalesDate={"$(=date(only(SalesDate)-7))"}>}SalesAmount)
Hope this helps