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: 
Not applicable

Formula problem - Set analysis in another set analysis

I have the following formula to calculate my total volumes:

(sum({$<MaterialTypeCode = {$(='FERT')}>} (Volume))) - this then adds up the volume of a certain product.

The I have a Previous Year Calculation:

(sum({$<Year = {$(=only(Year) - 1)}>} (Volume))) - this adds up all the volumes of all the products for last year.

How do I merge the top formula with the bottow one so that I can get the previous year volumes of that specific product?

This would basically be a set analysis in another set analysis. Is that possible?





1 Solution

Accepted Solutions
Not applicable
Author

Hi Christo

Try this:

(sum({$<MaterialTypeCode = {$(='FERT')}, Year = {$(=only(Year) - 1)}>} (Volume)))


i.e., between the <> you can separate different selections using a comma.

View solution in original post

2 Replies
Not applicable
Author

Hi Christo

Try this:

(sum({$<MaterialTypeCode = {$(='FERT')}, Year = {$(=only(Year) - 1)}>} (Volume)))


i.e., between the <> you can separate different selections using a comma.

Not applicable
Author

Thank you This works great.