Qlikview: Section Access and Sheet Access by region.

Here is a quick example.

USER1 can access Region: USA, USER2 can access Region: CANADA, USER3 can access Region: EUROPE, USER4 can access Region: ASIA and USA, USER5 can access All region.
You can change REGION to AccessLevel or TabName or whatever you need or want to call it.

Section Access;
LOAD * INLINE [
ACCESS, USERID, PASSWORD, REGION
ADMIN, ADMIN, ADMINPASS, *
USER, USER1, USER111, USA
USER, USER2, USER222, CANADA
USER, USER3, USER333, EUROPE
USER, USER4, USER444, ASIA
USER, USER4, USER444, USA
USER, USER5, USER555, *
];
Section Application;
LOAD * INLINE [
REGION
USA
CANADA
EUROPE
ASIA
];

Open up Document Properties and click Opening Tab.
SECTION_ACCESS1

Create 4 Sheets: one per region.
Create two Text object and one list box for REGION.
QVUser() will give you the user name.

Open up Sheet Properties for each sheet and type in following formula in Conditional for Show Sheet. Match() function returns position of corresponding text. Dollar Sign Expansion will be evaluated first and Concat() function will return Available REGION.
i.e. ‘USA’,’CANADA’,’EUROPE’,’ASIA’ or ‘USA’,’ASIA’ or ‘USA’ based on user Access.

QlikView will show the sheet if the result is not zero.

Tab USA: =MATCH(‘USA’, $(=CONCAT(CHR(39)&REGION&CHR(39), ‘,’)))
Tab CANADA: =MATCH(‘CANADA’, $(=CONCAT(CHR(39)&REGION&CHR(39), ‘,’)))
Tab EUROPE: =MATCH(‘EUROPE’, $(=CONCAT(CHR(39)&REGION&CHR(39), ‘,’)))
Tab ASIA: =MATCH(‘ASIA’, $(=CONCAT(CHR(39)&REGION&CHR(39), ‘,’)))

section_access5

section_access2

section_access3

section_access4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Simple!

  1. Hi I used the same code but for some reason it’s not working, region is showing USA for all users even for admin any idea?

  2. its working,problem with space before REGION name in inline i removed and its working

  3. Great!

  1. No trackbacks yet.

Leave a comment