I’m trying to create a dashboard where I have a control panel and I want one of the controls to be limited by what the user currently visiting the dashboard can see. I have a dataset which has the users and the stores that they are authorized to filter. Ex.:
User_name | Store_name
Joe | Store 1
Joe | Store 2
Sally | Store 1
And so, in the control panel, if Jose is visiting the dashboard he should be able to see the options Store 1 and Store 2 and Sally should only be able to see Store 1. The problem is that I’ve not been able to make this work. I’ve tried the approach descripted in here but it’s not working. I thought that I could filter the dataset based on the user accessing the dashboard but I have no idea if it is possible. I tried to access to access the parameter with the user name in the same way I would when creating a calculated field but with no sucess.
Create a RLS dataset with
quicksight_user_name. | store name
Please make sure that you get the full quicksight user name from the user management portal (manage quicksight–>users).
After then, apply this RLS dataset on top of your original dataset. It should work. Using row-level security (RLS) with user-based rules to restrict access to a dataset - Amazon QuickSight
I believe that solves it, but I still have an underlying issue with this: I have a dropdown control where all the options are available (ex.: even if it was Sally consulting the dashboard, she would still have the option to pick Store 2, despite she would not see any data). Is there any way to filter these options on the control filter as well?
@Hugo , You can do some tweak:
- Create a dataset with only Store. Do NOT apply RLS on this dataset. Call this dataset “control datasets”
- In analysis, include the “control datasets”, as well as the dataset with RLS, call “fact dataset”.
- For the visuals, create them from the “fact dataset”.
- Create a parameter called “Store”. Create a control based on “Store”. The control elements from Store of “control datasets”.
- Create filter to filter on the visuals. Let filter to be custom list and get the list from parameter “Store”
- All set!