Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sense Data reduction with Hierarchical Section Access

I want to provide user access based on their reporting hierarchy. So if Parent 1 has access to node 2,4,6 those are the only records they can see. I have created the user Hierarchy as shown on Sheet 1 in attached file and Access information is available in Organization worksheet. Following is the code I have so far but this shows all the information.

TempTree:

HierarchyBelongsTo(NodeID,ParentID,Employee,TreeID,TreeName)

Load

    NodeID,

    ParentID,

    UPPER(Employee) as Employee

FROM [lib://QVD Folder/Employee_Hierarchy.xlsx]

(ooxml, embedded labels, table is Sheet1);

//  Trees:

// Load *,

//      Upper(NodeID) as REDUCTION

//      Resident TempTree;

// Drop Table TempTree;

Section Access;

Auth:

LOAD

    "ACCESS",

    NTNAME,

  //  Username,

    NodeID as REDUCTION

FROM [lib://QVD Folder/Employee_Hierarchy.xlsx]

(ooxml, embedded labels, table is Organization);

Section Application;

Link2:

Mapping

Load

    ParentID as REDUCTION,

    Employee

FROM [lib://QVD Folder/Employee_Hierarchy.xlsx]

(ooxml, embedded labels, table is Sheet1);

1 Solution

Accepted Solutions
Not applicable
Author

I figured what was wrong. I just needed to rename NTNAME as USERID. Spent so much time on this!

View solution in original post

4 Replies
agigliotti
Partner - Champion
Partner - Champion

first of all you have to use UPPER function for both fields name and fields value in section access tables.

Not applicable
Author

All my data is in upper case in the Excel file, apologies I didn't show it clearly in the example file

agigliotti
Partner - Champion
Partner - Champion

I think you are missing to create a table to be used for data reduction in section application based on ParentID field value.

your Link2 table is not a resident table but only a mapping table.

Not applicable
Author

I figured what was wrong. I just needed to rename NTNAME as USERID. Spent so much time on this!