Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
we have to develop a 10 day rolling chart for sales.
when user select a month it should start from the max(date) till past 10 days
when user select a particular date , (ex: 03/25/2013) - it should start from 3/25 till past 10 days ...
My dimension is Date
expression: sum({<Date=">=$(=Max(Date-10)<=$(=Max(Date)))">}Sales)
this is not working ....
do i need to use valueloop to handle this ?
any idea ?
Hi,
You can use the below expressions for this :
sum({$<DATE={"<=$(=num(max(DATE)))"},DAY=,MONTH=>}Sales)
sum({$<DATE={"<=$(=num(max(DATE)-1))"},DAY=,MONTH=>}Sales)
sum({$<DATE={"<=$(=num(max(DATE)-2))"},DAY=,MONTH=>}Sales)
sum({$<DATE={"<=$(=num(max(DATE)-3))"},DAY=,MONTH=>}Sales)
sum({$<DATE={"<=$(=num(max(DATE)-4))"},DAY=,MONTH=>}Sales)
.... and so on.
Regards,
Udit
Sorry i forget to tell regarding summation
If u need to get sum of past 10 days then either manually create data for each 10 days from the expressions as mentioned in above post and add them .
or
use the below expressions:
=
sum({$<DATE={">=$(=num(max(DATE)-10))<=$(=num(max(DATE)))"},DAY=,Month=>}Sales)
Regards,
Udit