Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
wdchristensen
Specialist
Specialist

Apply a default filter to Qlik Sense April 2018

I have an app that contains 3 years of data and I want to default a filter to the most recent completed pay period. What is a good way to accomplish this on Qlik Sense April 2018?

I have implemented apps with the set analysis approach below and it leaves a lot to be desired...

if(getselectedcount(PayPeriodNum) = 0, Sum({$<PayPeriodNum={$(DefaultPayPeriod)}>} Hours), Sum(Hours))

I was considering using defaultSelectionExtension, has anyone had luck with that extension?

I am ready to learn a better way. I appreciate any assistance you can provide!

Labels (2)
1 Solution

Accepted Solutions
wdchristensen
Specialist
Specialist
Author

I used the extension defaultSelectionExtension and I was pretty impressed. It allowed for multiple default filter and work well with variables. The only shortcoming I see is that you must put the object on every page because the scope of the filter is at the sheet level. So if you only put the defaultFilterObject on sheet one and the user open the app to sheet two then the app won't filter like I would want (global filter applied regardless of what page was opened first). I was hoping I could nest the obj in the master filter item (which appears on all sheets in my app) but so far I have had no luck with that. Probably won't put too much time in that idea since it is included in the upgrade. Overall I would recommend the extension as a solution to hold you over until you can upgrade. 

As a side note, I did have some issues with defaulting dates because the OLE DB / ODBC drivers for SQL Server have a bug which doesn't recognize dates (oddly it works with datetime). For some reason it treats dates as a string. I put in a ticket to address this bug but it is a Qlik Sense driver issue and not a bug in the extension. 

MaxPeriod.PNG

FilterExample01042019.png

View solution in original post

2 Replies
wdchristensen
Specialist
Specialist
Author

Apparently if you have Sept 2018 you can use the Dynamic Default Bookmark Selection On Open to solve this issue. Maybe I will try it that way next year when we upgrade. Until the search continues... 

wdchristensen
Specialist
Specialist
Author

I used the extension defaultSelectionExtension and I was pretty impressed. It allowed for multiple default filter and work well with variables. The only shortcoming I see is that you must put the object on every page because the scope of the filter is at the sheet level. So if you only put the defaultFilterObject on sheet one and the user open the app to sheet two then the app won't filter like I would want (global filter applied regardless of what page was opened first). I was hoping I could nest the obj in the master filter item (which appears on all sheets in my app) but so far I have had no luck with that. Probably won't put too much time in that idea since it is included in the upgrade. Overall I would recommend the extension as a solution to hold you over until you can upgrade. 

As a side note, I did have some issues with defaulting dates because the OLE DB / ODBC drivers for SQL Server have a bug which doesn't recognize dates (oddly it works with datetime). For some reason it treats dates as a string. I put in a ticket to address this bug but it is a Qlik Sense driver issue and not a bug in the extension. 

MaxPeriod.PNG

FilterExample01042019.png