Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can we use section access to hide data (not reduce data) based on user accessing the dashboard.
For eg : I have below data
User | SalesAmount | City |
userA | 5000 | Tokyo |
userA | 10000 | Mumbai |
userB | 4000 | Madrid |
userC | 5000 | Lyon |
userB | 80000 | Frankfurt 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 ****)
User | SalesAmount | City |
userA | 5000 | Tokyo |
userA | 10000 | Mumbai |
userB | **** | Madrid |
userC | **** | Lyon |
userB | ***** | Frankfurt a.M. |
Any other way to achieve (besides section access) the above are also welcome.
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.
But this I would require to do for each control in dashboard.
I want it at script level and not at control level
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.