Display Value of One Parameter Based on Value of Another Parameter

Hi Quicksight community.

Could not find any answers. Maybe someone can help me with the problem.

I have 3 quicksight datasets :

  • organization_user (the fact table) that contains event data for users of organizations.
  • organization_visitors is also a fact table, that contains information who visited organizations and when.
  • organization_lookup is a lookup dataset with organization names and their IDs (i.e. organization_name =Organization1 and organization_id = 123).

I also have two quicksight parameters - organizationname and organizationid.
The parameter organizationname is:

  • a single value string.
  • mapped to the dataset parameters in organization_user and organization_visitors datasets.
  • used in a single value control (Organization Name) widget with mapping to organization_lookup dataset field, organization_name.
  • used in filters for visuals as a custom filter mapped to the given parameter.

The parameter organizationid is used in the url in a format mentioned in parameters-on-url documentation. Something like this:

https://us-east-1.quicksight.aws.amazon.com/sn/accounts/xxxxxxxxx/dashboards/xxxxxxxxxxxxxxxxxx?directory_alias=account-name#p.organizationid=123

The question here is how to show value in the dashboard control widget Organization Name/parameter organizationname as ā€˜Organization1’ when parameter organizationid=123?

Restrictions:

  • Parameter organizationid is the only one parameter that will be used in URL. It cannot be changed to organization name.
  • Once the user clicks on the dashboard link with a parameter and opens the dashboard, there should be ability to pick another value from the Organization Name control widget.

I tried creating another control with mapping to the parameter organizationid and a field organization_id in the dataset organization_lookup. But I could not get expected behavior. Please help

Hi @nefimova,
Making sure I understand the scenario correctly; when you click a link that sets your ā€˜organizationid’ parameter, you’d like the ā€˜organizationname’ control to show the matching value upon opening and the user should have ability to change organization name?

If you setup the parameter controls on the same base dataset, you can set the ā€˜organizationname’ control to show relevant values only based on the ā€˜organizationid’.

The dynamic default options for parameter controls are a bit limited and aren’t really setup to show a different default value based on another parameter. So if you’re only assigning one parameter value with your url link, it won’t be able to default a different parameter to matching value. You may just have to set the ā€˜organizationname’ control to all values, that way it will show relevant values allowing the user to pick a different value.

I’ve seen a couple similar requests relating to more flexibility with dynamic defaults when working with parameters so I’ll mark this as a feature request to promote visibility to the support team.

Let me know if you have any additional questions as well

Yes, your understanding is correct. I tried setting relevant values for another control. The problem is that once an url with a organizationid is set, organizationname parameter is filtered on the control panel, but not filtered on data. As both parameters cannot be used as a separate filtering condition.

I tried another way, which could work, but did not. I created a dataset for dynamic default values for organizationname using custom SQL. The dataset contains rows with user name, organization name and organization id. It has >1 row for each user. For example,

user1, organziation1, 123
user1, organziation2, 124

In this dataset I created a dataset parameter organizationid which was mapped to analysis parameter with the same name. The SQL logic is something like this: select * from default_organization dataset where organization_id = organizationid parameter.

So the dataset for the dynamic default values would filter data for the given user where organization id is the same as a parameter on URL. In this scenario the user could click on the link with parameter, see a default organization name in the control, but still could pick another organization from the picker.

Logic would work, but the problem is that from what I understand the dataset for the dynamic default values does not allow parameters in them (not sure if it is true, just my guess).

Based on what I mentioned above, the feature request would be to enable parameters in a dynamic default datasets for parameters.

1 Like