Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
brentdej
Contributor II
Contributor II

Set Analysis, Alternate States, Prior Year

I am using Set Analysis (QV11) with Alternate States and am trying to get a prior year calculation. The expression below works for the selected year, and is summing for the selections in the alternate state (GroupOne) but applying the time dimension selections in the default state. I can't seem to modify this to get a prior year calculation. The Year is a character string.

sum({GroupOne<Year = $::Year, Month = $::Month>} PremiumByPolicy) * .001

Thanks in advance...

2 Replies
Gysbert_Wassenaar

Perhaps like this:


sum({GroupOne<Year = {'$(=max({$}Year)-1)'}, Month = $::Month>} PremiumByPolicy) * .001


If not, please post an example document with sample data.


talk is cheap, supply exceeds demand
brentdej
Contributor II
Contributor II
Author

Thank you!

That worked perfectly.

Brent