Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Aspiring_Developer
Specialist
Specialist

Always one selected using filter pane

Hi Team,

 

I have a field as Fiscal year and it has the data from 2010 till 2020 in qliksense.

I am dragging this "Fiscal Year" in filter pane and i want the default selection to be the max of year i.e the latest year which is currently 2020

 

I tried creating a conditional dimension like :

if(getselectedcount(fyear)=0, num(max(fyear),'###0'), fyear)

But is it giving me error "Invalid Dimension".

I do not want to use any extension.

 

Please help.

 

Thanks in advance

4 Replies
anushree1
Specialist II
Specialist II

In this case you must create a bookmark and then apply it as a default bookmark, please check https://www.youtube.com/watch?v=d85WIgy35Ig

Aspiring_Developer
Specialist
Specialist
Author

Thank you for your response.

If i will use bookmark ,will the user be able to change the selection from the Filter pane and see the data for previous years also ?

anushree1
Specialist II
Specialist II

yes they will be.. the selection appears only when they open the app as default also you can have always one selected value checked if need be

stein_to
Partner - Contributor II
Partner - Contributor II

As far as I recall dynamic bookmarks don't work on fields marked as "always one selected value" https://community.qlik.com/t5/Qlik-Sense-App-Development/Dynamic-Default-Bookmark-with-Always-one-se...

It depends on the application but in some cases it makes sense to manipulate your data model in a way that QlikSense selects the value of your choice by default - without any extension or bookmark involved. Last time I faced such a problem I figured out that Qlik selects the minimum value of an "always one selected value" field. If you do not need the year for any calculation you can reverse the sorting order with the dual() function in your load script. Then 2020 will be selected by default because the numeric value is -2020 ...