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: 
srinu1255
Contributor
Contributor

when user opens dashboard , he would see only first 2 years data by default out of 5 years. How to achive it.Please answer some body

when user opens dashboard , he would see only first 2 years data by default out of 5 years. i came across this question  in recent interviews  How to achieve it.Please answer some body

Labels (1)
2 Replies
ATolbert_Consulting
Contributor
Contributor

There are a number of ways to achieve this but the clearest one is Section Access.  I suspect this is the direction of the interviewer as well. 

A basic solution would be something like this 

Section Access;
Access01:
LOAD * INLINE [
ACCESS, USERID, YEAR
ADMIN, admin, *
USER, user, *
USER, kevin, 2021
USER, kevin, 2020
];
Section Application;  

 Of course, you'd want to be more dynamic by creating variables for current and prior year, and inserting them in your inline loads.  Or managing a more sophisticated section access qvd or xlsx. 

Vegar
MVP
MVP

If you use Section Access the user will not be able to access the three remaining years at all. I would consider implementing an default bookmark (https://help.qlik.com/en-US/sense/November2020/Subsystems/Hub/Content/Sense_Hub/Bookmarks/set-defaul...).

Another alternative is to force your analytics dashboard to only display two years of analytics at all times by set analysis. E. g. =sum ({<[Year]={$(=max([Year], 1)), $(=max([Year], 2))>}[Amount])