Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis question , need a > then expression

Hi,

Trying to write a set analysis statement but can't seem to find the correct syntax. Trying to do a rolling average based on week of year. User select the number of weeks to include and I want to select all week greater thenthe current week of year - the number of week to include

avg( {1<[Week of Yr] >= { $(#=week(Now())- $(numweeks)) } > } [2009 sales figures])

It works perfectly for a single week, but when I add the > I get all weeks of 2009.

Thanks In Advance

Michael

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

You have to do the >= in the set expression itself. I think it would look like this:

avg({1<[Week of Yr]={">=$(=week(now())-$(numweeks))"}>} [2009 sales figures])

View solution in original post

2 Replies
johnw
Champion III
Champion III

You have to do the >= in the set expression itself. I think it would look like this:

avg({1<[Week of Yr]={">=$(=week(now())-$(numweeks))"}>} [2009 sales figures])

Not applicable
Author

thanks John!

that did it