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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Data Reduction Issue

I've been struggeling with this issue for a full day now.

I'm applying section access and data reducion in my model. Secion access works and data reduction gets applied, but incorrectly. It looks like QlikView reduce the data based on all the users in the control file and not only the logged in user. For instance, if user A can see all regions and user B can only see Cape Town, it doesn't matter which user logs in, the model always get reduced to Cape Town. Using the QVUser() function brings back the right logged in user. Can anyone help with this please?

QV Code:

section access;

star is ALL;

QVAUTHORISATION:

LOAD UserName as USERID, 

     Password as PASSWORD,

     Access as ACCESS,

     InsCode as INSCode,

     CompanyName,

     SourceCompany

FROM

[$(vSourceDataFoler)\MasterData\UserControl.xlsx]

(ooxml, embedded labels, table is Sheet1);

section application;

Regards,

Herman

2 Replies
Anonymous
Not applicable
Author

Hi,

try this:

section access;

star is ALL;

LOAD

     UserName as USERID, 

     Password as PASSWORD,

     Access as ACCESS,

     InsCode as INSCODE,

     CompanyName as COMPANYNAME,

     SourceCompany as SOURCECOMPANY

FROM

[$(vSourceDataFoler)\MasterData\UserControl.xlsx]

(ooxml, embedded labels, table is Sheet1);

section application;

and at the end of all your script add this:

 

TMP1:

LOAD

upper(InsCode) as INSCODE,

InsCode

RESIDENT

// The table where you get the field InsCode from

TMP2:

LOAD

CompanyName,

upper(CompanyName) as COMPANYNAME

RESIDENT

// The table where you get the field CompanyName from

TMP3:

LOAD

SourceCompany,

upper(SourceCompany) as SOURCECOMPANY

RESIDENT

// The table where you get SourceCompany from

Remember that when you use STAR (*) it will only show all the datas which are given to at least one user.

For exemple if one user can only see France and one other can only see Germany but you have also data for Spain, then the user with * will be able to see FRANCE AND GERMANY only as there is no user with the data from SPAIN.

If you want * to show all datas from a field then you must have at least one user for each data.

hic
Former Employee
Former Employee

You should not use several reducing fields. Or - my experience is that several reducing fields will lead to a reduction that sometimes is unexpected (however correct when you start to analyze it).

Since I do not know what your authorization table looks like, I cannot speculate about what causes the problem.

See more on http://community.qlik.com/blogs/qlikviewdesignblog/2012/10/02/complex-authorization

HIC