Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

0 Replies