Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Section Access to hide data

Can we use section access to hide data (not reduce data) based on user accessing the dashboard.

For eg : I have below data

   

UserSalesAmountCity
userA5000Tokyo
userA10000Mumbai
userB4000Madrid
userC5000Lyon
userB80000Frankfurt a.M.

When userA access the dashboard he should see all his record and the salesAmount of other users must be scramble (mask data - display sales amount of other users as ****)

   

UserSalesAmountCity
userA5000Tokyo
userA10000Mumbai
userB****Madrid
userC****Lyon
userB*****Frankfurt a.M.

Any other way to achieve (besides section access) the above are also welcome.

3 Replies
trdandamudi
Master II
Master II

One way of doing it without section access is as below:

Say if you have a straight table:

Dimensions:

       User

       City

Expressions:

          If (OSUser()=User, Sum(SalesAmount), Repeat('*',6))

This will give you exactly what you need and hope this helps..

Note: Please check the format of your OSUser(). Usually it will be domain\name or domain\id. To check type =OSUser() in a text box and you can see it. Based on that your "User" field should be in the same format in order for this code to work.

Anonymous
Not applicable
Author

But this I would require to do for each control in dashboard.

I want it at script level and not at control level

trdandamudi
Master II
Master II

You  also use this in the script like below:

Data:
Load User,
City,
If (OSUser()=User,SalesAmount, Repeat('*',6)) as SalesAmount ;
Load * Inline [
User, SalesAmount, City
userA, 5000, Tokyo
userA, 10000, Mumbai
userB, 4000, Madrid
userC, 5000, Lyon
userB, 80000, Frankfurt a.M.
]
;

Say if you have a straight table:

Dimensions:

       User

       City

Expressions:

          =SalesAmount

Hope this helps.