Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have my security table like below
ACCESS | NTNAME | USER_GROUP |
USER | ABC | SUPERGROUP |
USER | XYZ | NON_INT_GROUP |
USER | PQR | INT_GROUP |
and code
Section Access;
load
ACCESS, NTNAME, USER_GROUP
from .... .qvd;
Section Application;
i would like to reduce data in two levels, country and dept
so i have the country and dept table which linked with above table, assume like below;
USER_GROUP | COUNTRY | DEPT |
XXXXXX | Canada | INT |
XXXXXX | Canada | NON_INT |
XXXXXX | MEXICO | Other |
My question is,
1. when user login as PQR, he should see, all canada details including INT and NON_INT dept
2. when user login as XYZ, he should see, Canada details, but only related to NON_INT dept
I made a key, using (COUNTRY &'##' & DEPT ) as KEY and integrated with section access, but it does not work the way i want,
is there any suggestion or some simple technique to get it done..
thanks in advance
Ren
The simplest way is the following:
UserGroup:
LOAD USERGROUP,
UPPER(COUNTRY & '#' & If(Len(Trim(DEPT))=0,'<ALL>',DEPT)) as KEY
FROM HierarchyInSectionAccess.xlsx (ooxml, embedded labels, table is UserGroup);
BridgeTable:
LOAD COUNTRY,
DEPT,
Upper(COUNTRY & '#' & '<ALL>') as KEY
FROM HierarchyInSectionAccess.xlsx (ooxml, embedded labels, table is Dimension);
LOAD COUNTRY,
DEPT,
UPPER(COUNTRY & '#' & DEPT) as KEY
FROM HierarchyInSectionAccess.xlsx (ooxml, embedded labels, table is Dimension);
You probably need to have the UserGroup table inside Section Access, and if you need additional tables for country and dept, you should link those to the BridgeTable
HIC
Thanks a lot Henric, it worked sucessfully moreover i have moved one step ahead in qlikview learning.
Thank you all.