6 Replies Latest reply: Jun 7, 2013 4:51 AM by sushil kumar

# rolling seven days Set analysis

hi i would like to calculate a value;

Rolling seven days   (today-7 days)

*

sum(Levererat Antal)

i have the following syntax which is incorrect i see;

sum({<Leveransdatum={today()-7}>}[Levererat Antal])

Best,

• ###### Re: rolling seven days Set analysis

Try this:

sum({<Leveransdatum={'\$(=Date(today()-7,'MM/DD/YYYY')'}>}[Levererat Antal])

I am assuming that Leveransdatum has date format like MM/DD/YYYY.

HTH

Sushil

• ###### Re: rolling seven days Set analysis

Hi  i still have syntax error,

• ###### Re: rolling seven days Set analysis

Sorry, there is an error

Try this one:

sum({<Leveransdatum={'\$(=Date(today()-7,'MM/DD/YYYY'))'}>}[Levererat Antal])

• ###### Re: rolling seven days Set analysis

Hi it is not working unfortunately,

do i need to create a new variable?

i have already a variable that vToday = Today() -7;

can i use this in the expression

=sum({<Leveransdatum={'\$(=vToday,'YYYY-MM-DD)'}>}[Levererat Antal])

Date format is also YYYY-MM-DD

Best,

• ###### Re: rolling seven days Set analysis

Hi,

You can try with the below code.

Regards,

Tom

• ###### Re: rolling seven days Set analysis

Try this:

vToday =Date(Today() -7,'YYYY-MM-DD')

Then expression

=sum({<Leveransdatum={'\$(vToday)'}>}[Levererat Antal])

or

=sum({<Leveransdatum={"=\$(vToday)"}>}[Levererat Antal])

if still it is not working then post the sample application.

HTH

Sushil