Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
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