Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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.
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])