Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Weekcounter in set analysis

Hi all.

I have a set analysis syntax that work fine and looks like this:

sum({$<OK={'1'},Station={'Green'}>} OK ) / (count({$<OK={0},Station={'Green'}>} Resp_ID & Fraga_ID ) + sum({$<OK={'1'},Station={'Green'}>} OK ))

But I would like show for example the latest 4 weeks. I tried to add a weekcounter but it does'nt really works:

sum({$<WeekCounter={">$(#=max(WeekCounter-5))<=$(#=max(WeekCounter)-1)"}, OK={'1'},Station={'Green'}>} OK ) / (count({$<OK={0},Station={'Green'}>} Resp_ID & Fraga_ID ) + sum({$<WeekCounter={">$(#=max(WeekCounter-5))<=$(#=max(WeekCounter)-1)"},OK={'1'},Station={'Green'}>} OK ))

Any suggestions what I'm doing wrong?

1 Reply

'it doesn't really works' is not really helpful to understand your issue.

Try to post as many details as possible about your setting, the response you expect and the response you get.

Looking at your expression, why don't you add the WeekCounter field modifier also to your second aggregation?