Hi @jtroxel, handling a situation where you need to cross-reference a URL parameter with a different dataset identifier requires a bit of setup but is feasible. This is particularly useful for embedding scenarios where you pass parameters from a web application to control the visuals in Quick Sight.
Here’s how you can achieve this:
Step 1: Prepare Your Dataset
First, ensure that your dataset in Quick Sight includes both the identifier that you will receive from the URL parameter (let’s call it ID_Number) and the identifier you need to display or use in the visuals (let’s call it Name).
Step 2: Set Up a Dataset with Both Identifiers
Your dataset should have a structure where each ID_Number is associated with a Name. This mapping is crucial because it allows Quick Sight to recognize the relationship between the two identifiers.
Step 3: Use URL Parameters in Quick Sight
When embedding a Quick Sight dashboard, you can pass URL parameters to filter the dashboard. Set up your embedding URL to pass the ID_Number as a URL parameter.
Step 4: Create a Calculated Field for Filtering
In Quick Sight, create a calculated field that will serve as a filter based on the URL parameter. This field will act as a bridge between the ID_Number passed in the URL and the Name used in your visuals.
Matched_Name = ifelse({ID_Number} = ${url_parameter}, {Name}, null)
In this calculated field, ${url_parameter} should be the placeholder for the URL parameter you pass. Replace {ID_Number} and {Name} with your actual field names.
Step 5: Apply the Filter to Your Visuals
Use the Matched_Name calculated field as a filter in your visuals. Set the filter to exclude null values. This way, only the records where Matched_Name is not null (i.e., where ID_Number matches the URL parameter) will be displayed.
Step 6: Embed Your Dashboard
When embedding the dashboard into your web application, make sure to pass the ID_Number correctly as a URL parameter. Here’s a basic example of how to structure your embedding URL:
https://your-region.quicksight.aws.amazon.com/sn/embedded/dashboards/12345678-1234-1234-1234-123456789012?ID_Number=specificID
Replace your-region and the dashboard ID with your actual AWS region and dashboard ID, and specificID with the dynamic ID you want to pass from your web application.
Conclusion
This setup allows you to pass a specific identifier through the URL, which filters your dataset indirectly through another identifier. It’s particularly useful for scenarios where the direct identifier used in the dashboard is not suitable or available in the embedding application. Make sure your dataset is properly structured with clear mappings between these identifiers to ensure accurate filtering.
We hope this solution worked for you. Let us know if this is resolved. And if it is, please help the community by marking this answer as a “Solution.” (click the check box under the reply)