Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
John3
Contributor III
Contributor III

creating a bar chart that has two years.

How do I create a bar chart with two dimensions? The first dimension is a year chosen and the second dimension automatically becomes the previous year?

Labels (1)
1 Solution

Accepted Solutions
MayilVahanan

HI @John3 

Try like below

Sum({<Year={$(=Max(Year)), $(=Max(Year)-1)}>}Sales)

Hope you can learn set analysis in near by future.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

6 Replies
Dalton_Ruer
Support
Support

That is called Set Analysis. I've written an entire hands on Workshop that walks through all of the wonderful use cases for it, including this exact example.

https://community.qlik.com/t5/Documents/Hands-on-Set-Analysis-from-the-ground-up/ta-p/1799118

I would recommend you follow some starting examples where I FORCE the date in question to be 2018 and 2017 so you can get familiar with Set Analysis, but if you want to try and jump into the deep end page 20 has examples very much like what you are trying to do. 

 

 

MayilVahanan

HI @John3 

Try like below

Sum({<Year={$(=Max(Year)), $(=Max(Year)-1)}>}Sales)

Hope you can learn set analysis in near by future.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
John3
Contributor III
Contributor III
Author

Thanks Mayil Vahanan. Do you know any good set analysis courses?

John3
Contributor III
Contributor III
Author

Thanks Mayil Vahanan.

MayilVahanan

Hi @John3 

In Community, you can see many set analysis pdf which will help you

https://community.qlik.com/t5/Qlik-Education-Documents/Set-Analysis-Presentation-pdf/ta-p/1487937

https://community.qlik.com/t5/Documents/Set-Analysis-1-pdf/ta-p/1480757

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
John3
Contributor III
Contributor III
Author

Thanks.