Assign Parameter to a dataset field value - anonymous embedding


Can we have a parameter in analysis and its value assigned as the distinct value of a dataset field?

We are using anonymous user embedding and want to display or hide a tile based on a particular value of a column in the dataset. Any help how could this be achieved.

Many Thanks

Hello @Sam1, I am thinking this might be something that could be done by adding a parameter directly on the dataset and mapping it to a filter on the analysis. That parameter will need a default value and the filter could exclude it if it is the wrong user. I know my answer is a little vague, I think a little more detail might help me provide a more conclusive solution.

Hi @DylanM

Thanks for reply, let me elaborate, There are actually 2 scenarios:

I am using a anonymous dashboard embedding so I was thinking if I could assign a parameter with the distinct value of a field from the dataset. Lets say parameter p1 gets value of col1, That field (col1) is a tag for RLS.
So If a user has come to a dashboard and that parameter gets assigned to col1 value, I could display an extra tile and hide it for other users as the parameter would get different value.

Alternatively, if I have a filter and depending on the value selected in the filter could I assign that to a parameter, and use that parameter in the calculated field.
There is a calculated field which used col1 for the calculation, but if the user has selected any other value in the filter, I would like the calculated field to be using Col2


Hello @Sam1, do you have a dataset created that contains your RLS data for all of your QuickSight users and contains a column attached to the user for col1? If that is the case, you can create a dynamic default value for the parameter if you add that dataset into your analysis.

Select the parameter, click “Set a dynamic default”, in the dropdown add your RLS dataset, then you can use the user name column or group name column to match the column for your default value. That might get you to the solution you are looking for!

Hi @DylanM
No, Since we are using anonymous embedding, we don’t have username/group name in the dataset, to set the dynamic default.
Is there a way to get the value selected in the dropdown by the user?


Hello @Sam1, if you wanted to dynamically update the parameter without any way to declare a user on QuickSight, you could possibly do it on the front end of the application that you are embedding QuickSight into. Utilizing the quicksight API and the aws SDK if you could determine what that value would be on the front end, you could dynamically pass that into the parameter for the Dashboard and update it that way. That will be the only way to accomplished what you are looking for. I will link the documentation for the SDK page that would be the most helpful.