Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm looking for an set analysis statement that gives me the rolling 12 months Sales bases on an OrderDate selection (listbox)
This expression:
=sum(if(OrderDate>addmonths(vDate,-12) and OrderDate<=addmonths(vDate,0), LineSalesAmount)) (//vDate = variable)
.....into set analysis.
I hope you can help me!
=sum({<Date(OrderDate)="{$>vStartDate<vDate}" >}Sales)
values in the OrderDate is timestamp . when i put Date function in front of the OrderDate , its giving values.
Use the following expression:
=sum({<OrderDate={"$>vStartDate<vDate"} >} LineSalesAmount)
where,
vStartDate = addmonths(vDate,-12)
I got a 0 as result
I guess, it could be due to the values of the variables. Have you defined the variables correctly. Check the values of the variables 'vStartDate' and 'vDate' and see if they are different.
vDate = 1-1-2009
vStartDate = 1-1-2008
but the expression gives still 0.
Can you check with this:
=sum({<OrderDate="{$>$(vStartDate)<$(vDate)}" >} LineSalesAmount)
The quotes were placed wrongly in the last expression
Hi,
try the set analysis like this,
=sum({<[OrderDate]={">$(vStartDate)<$(vDate)"}>} LineSalesAmount)
Hope this would help,
Regards,
tresesco
Hi,
Still 0 as result.
I tried the expression below for testing vStartDate en VDate and this is working fine.
=
sum(if(OrderDate>=vStartDate and OrderDate<vDate, LineSalesAmount))
can you attach an example document. I will check the expression in the file.
Hope you can find what I am doing wrong!