Qlik Community

Qlik Sense Enterprise Documents & Videos

Documents & videos about Qlik Sense.

Mask or de-identify data for certain users using Section Access

Employee
Employee

Mask or de-identify data for certain users using Section Access

In many industries including education and healthcare, it is necessary to mask or de-identify certain sensitive fields for certain user groups but also be able to see the data in total for the purposes of comparison or benchmarking.

This can be achieved by setting a flag in the section access table for users to determine whether they should see the real data or a masked version of the sensitive fields. In the example below, the code is restricting some fields for users at the individual school level but allowing schools to compare their results to the rest of the schools in the data set.

Please refer to the attached QVF and remember that Section Access does not function in Qlik Sense Desktop and must be deployed to a Qlik Sense Server environment. I've also attached the QVW for the QlikView solution.

Notes

  • Uncomment the commented section of the code
  • Change userA, userB and adminUser to users in your environment
  • The solution works for both QlikView and Qlik Sense.
  • Consider aggregating the de-identified facts to reduce the number of records in the app.

userA from SchoolA will see just Teacher and Student for School A records ONLY. All other schools will have the words De-identified in the Teacher and Student columns:

usera.PNG

Credit to my colleague Yaniv Feldman yfe for this solution.

Matt Nunn

Qlik Consulting

Attachments
Comments
wkthac222
Contributor

Hi Matt,

is it possible to get the result as qvw as well?

Regards, Chris

Employee
Employee

No problem Chris - I've attached the sample code in a qvw.

nkaruwon
New Contributor

I have followed instructions on the document above. I am trying to have all the other non admin users see only their records with the rest of the records marked as "De-Identify" . When I pull the information on my visualisation as the said users, I correctly see the user record and only one other De-Identified record.  I am expecting more records to be presented in this manner but I only see 1 record.  Where could I have gone wrong? Anyone please assist.

Nice work!

Version history
Revision #:
1 of 1
Last update:
‎03-11-2017 04:43 PM
Updated by:
Employee