Passing filter values into direct query

Hello,

I am working to create tables and visuals to mimic those from a tool we are offboarding using data from our Postgres DB. That tool allows parameters to be passed directly into the query (and within various CTEs) rather than just at the very end (via filters). Is there a way to pass filter parameters directly into the query within Quicksight? For some of our lighter dashboards filtering in the end works well but for others the filters need to be applied in an early CTE for the query to finish in Quicksight.

We are trying to keep the same level of functionality as the previous tool so we want to allow our dashboard users to be able to change the subsets they are looking at without needing to flip through many different sheets.

I have seen posts asking similar questions but no resolution about an actual feature itself.

Thanks

Hi @jgorelik - Welcome to AWS QuickSight and thanks for posting the question. In data preparation stage or custom sql, I believe you can not pass any parameter. You can put filter to cut down your data volume. One of the approach you can explore to use SPICE for faster performance. It is not always true to mimic same approach from one BI tool to another however the end reporting side and experience should be same.

By saying this, lets hear from other experts @David_Wong @Naveed @sagmukhe @duncan @DylanM - please provide your advise on this.

Regards - Sanjeeb

Hi @jgorelik
did you check

You can insert a parameter into the dataset. After that you can link a parameter within the analysis to it.
Is that what you are looking for?
BR

3 Likes

You can also take a look at this blog.

Hi all,

Thanks for your advice. Dataset parameters seem like they could be the solution to our issue. Right now I am having trouble getting it to show more than just the default value in the analysis. I.e. we have custom SQL code that looks like:
select some things where id = <<$parameter>>
where the parameter is defined and has a default value.

When I try and create a control in the analysis built off of the dataset the only option in the control when it is linked to the id data field is the default value. Can you please advise on what I need to fix this so that all id values (and there are < 1000 since i read that is a limitation of the dropdown) are available and when a user selects one, the underlying query and the visuals built on top of it change accordingly

Thanks

@jgorelik, can you double check if the analysis parameter is set to show specific values or Link to a data set field then it will show all the values available in a dataset field as drop-down values for user selection. Please refer this doc guide - Using a control with a parameter in Amazon QuickSight - Amazon QuickSight.

Hi all,

I have linked it to the data field and it is still limited to the one default value. I am attaching images below:


Screenshot 2023-11-14 at 11.33.42 AM

Please let me know if you need any more information

Thanks

@jgorelik Follow this guide ( Advanced use cases of dataset parameters - Amazon QuickSight ) . You need to link to another dataset which has all the values that are to be shown in the dropdown control .

1 Like

Hi,

Can you take a look at this video and the post in general to see if this helps you with your question?