Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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
MVP
MVP

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

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
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
MVP
MVP

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.

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
Not applicable
Author

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