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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to calculate of last three months average sales based on my selection?

Dear All,

How can I calculate of last three months average sales based on my selection?

As an example,if I select Aug-18 then calculated average sale should be of '(June-18 + July -18 + Aug - 18)/ 3'

Thanks in advance

23 Replies
Anonymous
Not applicable
Author

sent...can you please check.....

YoussefBelloum
Champion
Champion

ok, I see your problem..

you were making selections on FMonthName and you didn't detach it from the set analysis:

try this exact expression on your AvgSales formula:

sum({<FMonthName,FMonth={">=$(=Max(FMonth)-2)<=$(=Max(FMonth))"}>}SecNetAmount)/3

Anonymous
Not applicable
Author

Thanks dear...It works 😄

YoussefBelloum
Champion
Champion

‌You’re welcome

Good luck