Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

srikanthsri1
Valued Contributor

Need help with the expression for calculating average

i have year 2011, 2012,2013, but this is fiscal year data ( 2011-2012), (2012-2013)

now i need to calculate the 2 yr avergae for a selected week

count(disctinct (year) =3  but i need 2 here if i subtact the vaule using -1 then if user selects single year whole vaule is 0

how to write a expression for this ?

i need a expression some what like this

(sum( max( week) + sum( max(week-52))/count(max(week) + count(max(week-52))

here (week-52) is the previous week but count(max(week) is showing null

Community Browser