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

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to calculate an average at the end of the last year ?

Hi,

I want to calculate an average at the end of the last year. I want to put the condition in the following formula but I don't find the good way :

avg([Prix de vente]).

Can you help me to find the good formula please ?

Thanks.

Regards



1 Reply
vgutkovsky
Master II
Master II

Something like this should work:


avg({$<Year = {$(vLastYear)}>} [Prix de vente])


This comes from the Set Analysis article in the help file. In this example, you would set a variable vLastYear to year(today())-1

Regards,