Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi experts,
I have one date field in my data.and some id,sales of data is there.
here if I select any date it has to go 7 days back.
here the data in date field is 01/01/2015 to 20/01/2015 for example
if I select 07/01/2015 it has to show 01/01/2015 and 07/01/2015 of both dates data.
same way if I select 01/01/2015 it has to show 25/12/2014 and 01/01/2015 of both dates data.
I have some ideas but those ideas are not giving proper result.
any ideas.
Hi,
You can use two expression and add them, just like below.
Sum({<Date = {"$(=Max(Date))"}>}Sales)
+
Sum({<Date = {"$(=Max(Date)-6)"}>}Sales)
Regards,
Kaushik Solanki
Could you post a sample document?
ans just simply try debugging date +7 to see if you are getting the correct date?
You can use set analysis for this.
For example, create a straight table chart with dimension id and then two expressions:
=sum(sales)
=sum({<datefield = {"$(=Date(max(datefield)-6,'DD/MM/YYYY'))"}>} sales)
replace id, datefield and sales with your appropriate field names. You may need to adjust the Date() format code to match your format of datefield.
wan to show only for both dates or for all 7 days back. If it is for only both dates then you can go for what kaushik has suggested. If you want for all 7 Days then use below
Sum({<Date = {">=$(=Max(Date)-6)<=$(=Max(Date))"}>}Sales)