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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
masdler1
Contributor II
Contributor II

How to do the following: sum(sum(Field A) * avg(Field B)) in Qlik?

Hi,

I have two fields: A and B. I need to sum all the values in Field A and multiply it by the average value of Field B so basically sum(sum(Field A) * avg(Field B)). When im trying to do this in qlik I get an error. How could I achieve this? Thanks in advance.

Labels (2)
10 Replies
masdler1
Contributor II
Contributor II
Author

The expression sum({$<Year={"$(=max(Year)-1)"}>} [Field A]) * avg({$<Year={"$(=max(Year)-1)"}>} [Field B]) worked perfectly, thank you so much!