I would like to set my KPI to be based on the latest year when users open up the worksheet. This will have a secondary figure which shows the value of year-1. However, I would like the figure in KPI to change based on user selection. For example it is now 2017. The sales figure for the sales field should sum up 2017 and show 2016 figure for comparison. If users select 2016 in the filter, the KPI should show 2016 and 2015 figures. How can accomplish this?
Qlik doesnt know default value when nothing is selected and thus we write the set analysis to tell Qlik to consider value.
In your case if you use the Max function, it will take the maximum value from the entire data and assign it as default value, but as soon as selection is made it will recalculate the max and assign it as default value.