Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
Flamingi
New Contributor

Compare user selected time frames

I want to show a comparison between two time frames which are chosen by the user. The user should be able to choose Year + (multiple not necessary consecutive) months for one timeframe and the same for the second timeframe. 

I want to display a chart with e.g. the number of sales in the selected timeframes next to each other.

My data is just one table, each row representing one sold product including the date the product was sold.

What is the best way to achieve this? I have searched and came up with some solutions, that did not work:

  • using a generated, isolated date table and then using getfieldselections within set analysis --> only works if one month and one year is selected. Multiple selections are not possible
  • We have the complete VizLib Extensions. Tried using the alternate states --> currently not working in Qlik Enterprise Cloud
2 Replies

Re: Compare user selected time frames

Would you be able to share a sample where you have tried out both the options? It would be easy to see what you have and then help you.

Flamingi
New Contributor

Re: Compare user selected time frames

Hi, sorry for the late answer. Please check the attached qvf. The data is structured similar as in this Testfile. I want to show different calculations, for example the waterfall chart on the sheets, but feel free to show different calculations (like sum of price). On the second sheet I tried to implement a solution to choose different timeframes, unfortunately it does not work when months are selected and in the original date a different year is selected (i dont know why, shouldnt be the case because the selection should be overwritten by the set analysis). Another flaw with this solution is the sheer time it takes to calculate. In this test file are only 50 products and it already takes like 20 seconds to refresh. In the real application we are talking about ~5 Million entries.