Filters do not show any values when using parameter in direct query

I am having an issue with filters. I have a dataset that is set as direct query. Let’s just say the query is select business_year, region from t1 where business_year = <<$year>>.

Now the region filter does not show any values on the sheet. This is after I have mapped parameter $year, and selected a value for $year in the sheet. The visuals are working correctly as well. Why is region filter not showing any values?


In the context of QS, if you are encountering issues with filters, particularly when a region filter is not displaying values after setting a parameter for business_year, there are several steps you might consider to resolve the issue. Firstly, ensure that the parameter $year is correctly mapped to the business_year field in your dataset. It is crucial to verify that the parameter settings are accurate and that the appropriate values are being passed.

Next, confirm that the dataset has the necessary permissions and that the data source is accessible, as permission issues can prevent data retrieval. Additionally, validate the availability of data by confirming that there are records in your dataset for the selected business_year. If there are no records for the chosen year, the region filter will not display values.

Also, check the configuration of the region filter, ensuring it is set to filter on the correct field and is not inadvertently set to a static value or another parameter. It is advisable to refresh the data in QuickSight to ensure that the most recent data is being used, as cached data can cause discrepancies.

Finally, if there are dependencies or cascading filters, verify that they are configured correctly and are not conflicting with the region filter. By following these steps, you should be able to identify the reason why the region filter is not displaying values. If the issue persists, consider reviewing the dataset query and any applied transformations to ensure they are functioning as expected.

Thanks for the response. I tried those but didn’t work. What worked was doing this: select business_year, region from t1 where business_year = <<$year>> or <<$year>> = 'none'. basically there is data even when the parameter is not selected, as “none” is the default value of the parameter