If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.
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?
HI @John3
Try like below
Sum({<Year={$(=Max(Year)), $(=Max(Year)-1)}>}Sales)
Hope you can learn set analysis in near by future.
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.
HI @John3
Try like below
Sum({<Year={$(=Max(Year)), $(=Max(Year)-1)}>}Sales)
Hope you can learn set analysis in near by future.
Thanks Mayil Vahanan. Do you know any good set analysis courses?
Thanks Mayil Vahanan.
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.