Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
sumanta12
Creator II
Creator II

Section access on Hierarchy

Hi,

I have data set like below 

REGIONAL_HEAD AMPM STAFF_MEMBER
A B X
A B Y
A C P
A C Q
A D M

 

So when logged in he can see his data as well as B, C D, X,Y,P,Q,M data

when B logged in he can see his own data as well as X, Y data

similarly when X logged in he can see his own data.

How to achieve this in section access??

I tried with hierarchybelongsto function but as we have 300k records that why it is getting mulitipled to huge no of records and failed after loading 5 hrs.

 

1 Solution

Accepted Solutions
sumanta12
Creator II
Creator II
Author

I have written the below script & it is working fine:

Section Access;
AUTH:
LOAD
'USER' AS ACCESS,
RH AS USERID,
SM
FROM
[C:\Users\manda\Desktop\Hierarchy_test_data.xlsx]
(ooxml, embedded labels, table is SALES);
LOAD
'USER' AS ACCESS,
AMPM AS USERID,
SM
FROM
[C:\Users\manda\Desktop\Hierarchy_test_data.xlsx]
(ooxml, embedded labels, table is SALES);
LOAD
'USER' AS ACCESS,
SM AS USERID,
SM
FROM
[C:\Users\manda\Desktop\Hierarchy_test_data.xlsx]
(ooxml, embedded labels, table is SALES);

Section Application;

TAB:
LOAD
RH,
AMPM,
SM,
SALES
FROM
[C:\Users\manda\Desktop\Hierarchy_test_data.xlsx]
(ooxml, embedded labels, table is SALES);

View solution in original post

19 Replies
abhijitnalekar
Specialist II
Specialist II

Hi @sumanta12,

Is it possible to share the sample transaction data also? 

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
sumanta12
Creator II
Creator II
Author

CHK_NO AGENT_CODE STAFF_MEMBER AMPM REGIONAL_HEAD SUBMISSION_DATE SALE_DATE OUTCOME OUTCOME_CUST
2 761022 X B A 8/11/2021 8/11/2021 FAIR UNCLEAR
10 761022 Y B A 8/11/2021 8/11/2021 NOT_APPLICABLE UNCLEAR
14 761022 P C A 8/11/2021 8/11/2021 FAIR UNCLEAR
abhijitnalekar
Specialist II
Specialist II

Hi @sumanta12 ,

I guess you don't need to create the hierarchy or something to achieve the section access.

you can apply for the section access on multiple fields. you can create your section access script as below.

Section Access;

[Security]:

LOAD ACCESS,
 Upper(USERID) as USERID,
 upper(REGIONAL_HEAD) as REGIONAL_HEAD,
 Upper(AMPM) as AMPM,
 Upper(STAFF_MEMBER) as STAFF_MEMBER;

Section Application;

 

your section access table will look like below .

ACCESS USERID REGIONAL_HEAD AMPM STAFF_MEMBER
USER USER1 A    
USER USER2   B  
USER USER3     X

 

where User1 will have access to all the data

User2 will have access to AMPM B data which 

and User3 will have access to data for X only

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
sumanta12
Creator II
Creator II
Author

How to get USERID here?

abhijitnalekar
Specialist II
Specialist II

Hi @sumanta12 ,

You have to enter the user name manually in this table.

you will get a user ID from qliksense directory.

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
sumanta12
Creator II
Creator II
Author

@abhijitnalekar  This is not working.

sumanta12
Creator II
Creator II
Author

Suppose This is my fact table. Now I have to create security in such a way that when 'A' logged in he can see his data as well as 'B', 'C', 'D',X,Y,P,Q,M

When B logged in he can see only his data as well as X, Y data like that.

I don't have any other table.

REGIONAL_HEAD AMPM STAFF_MEMBER Value
A B X 10
A B Y 20
A C P 30
A C Q 40
A D M 50
abhijitnalekar
Specialist II
Specialist II

Hi @sumanta12 ,

 

How the users are set up in the Qliksense QMC.

means credentials which you use while connecting to the hub.

 

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
sumanta12
Creator II
Creator II
Author

@abhijitnalekar They will connect using their ID (DOMAIN\A) like this.