How to show/hide a title visual based on filtered data presence?

Hi everyone,

I’m currently building a report in Quick Sight. On my dashboard, I have two visuals using the same dataset:

  • One visual is used to display a title (text-based).
  • The other visual is used to display actual data.

I also have a filter and a parameter that are used to filter the dataset.

Here’s the problem:
When I apply the filter and the result returns no data, both visuals display “No data” — including the title visual.

:magnifying_glass_tilted_left: What I would like to achieve:

  • When there’s no data, either hide the title visual
    or show a custom fixed message like “No Data Available”.

I know that visibility rules can hide a visual based on parameter values, but I couldn’t find a way to link the result of the filter (e.g., row count) to a parameter.

So my questions are:

  1. Is there any way to link the data presence (e.g., row count after filtering) to a parameter so that I can use it in a visibility rule?
  2. Or is there another method to conditionally hide or change the title visual based on whether data exists?

Any suggestions or workarounds would be really appreciated. Thanks in advance!

Hi @Archie1 and welcome to the Quick Sight community!
This seems to be a fairly common request recently, unfortunately as you’ve encountered, there’s no great way to handle the hiding of a visual based a lack of data.
You may be able to build an ifelse statement that uses the isNull function to check your fields being used, then return a 1 or 0, then utilize in a parameter that just hides/shows the visual like you mentioned.
This could depend on how many fields you’re utilizing in your visual though and depend on how extensive you’d like to go…but to my knowledge, that type of scenario would be the only current workaround.
As I mentioned, this seems to be a fairly common ask so I’ll mark this as a feature request to promote visibility to the AWS support team.

Hi @Brett. Appreciate the suggestion — I’ll test it and see how it works.

Hi @Brett, I just tried to implement what you suggested. Currently in my title visual, I have only one field baseDateStr to display as title of report. I created a calculated field.

hasDataFlag
ifelse(isNull({baseDateStr}), 0, 1)

I created a parameter called showTitleVisual whose default is 1.

Current problem is I don’t know how to make the parameter dynamic. Like when there is no data after filtering, the value of parameter is 0, otherwise, return 1. Any idea?

Thanks for sharing your approach so far — you’re definitely on the right track using a calculated field and a parameter.

However, we can achieve the desired behavior by modifying your calculated field to check whether any data exists after filtering. You can use a Level Aware Calculation (LAC) to evaluate the presence of data across the filtered dataset and then use that result directly in your title visual or as a condition to show/hide it.

Hi @Hasnain-VW. Thanks for providing the idea. Not sure I understand it correctly. But even I used LAC to evaluate the presence of data, it’s still a calculated field. It won’t display when there is no data on my title visual.

For using it as a condition, I think it will encounter same sitiation as I previously asked.

Current problem is I don’t know how to make the parameter dynamic. Like when there is no data after filtering, the value of parameter is 0, otherwise, return 1. Any idea?

Hi @Archie1,

Actually, it is possible to create a calculated field that dynamically detects whether data is present after filtering—essentially acting like a “dynamic parameter” within Quick Sight, without requiring any manual updates.

Here you can try using Level Aware Calculations (LAC):

ifelse(maxOver(countOver({baseDateStr}, [], PRE_AGG), [], PRE_AGG) = 0,0,1)

This will automatically hide your title visual when the filtered dataset is empty.

If you’d like, I’d be happy to guide you through the setup process!

Hi @Hasnain-VW
Sounds like exactly what I wanted. I have modified my hasDataFlag calculated field with LAC. Could you please share how to setup the field on my title visual?

Yes @Archie1,
You can definitely use the same approach in the title visual. Try modifying your calculated field like this:

ifelse(maxOver(countOver({baseDateStr}, [], PRE_AGG), [], PRE_AGG) = 0,Title,Default Title/Value)

This will dynamically show the title based on whether there is data after the filter is applied. If no data is present, it will display ‘Title’; otherwise, it will show ‘Default Title/Value’ (or whatever fallback you prefer).

Let me know if you need any further help with this setup!

Hi @Hasnain-VW

I tried to modify my calculated field as

ifelse(maxOver(countOver(baseDateStr, [], PRE_AGG), [], PRE_AGG) = 0, "", baseDateStr)

and display this filed on my title visual. But it actually has same behavior as I encountered before :slightly_frowning_face:. It is still showing default message when there is no data.

Hi @Archie1 ,
You can create a dynamic mapping parameter with default column and in rules of title visual can set up if wants to achieve ( hide the title visual) else you have already achieve ( show a custom fixed message like “No Data Available”)

Hi @Hasnain-VW ,

I created a a dynamic mapping parameter with default column before. To make the parameter dynamic, I added a dropdown control for this parameter and link it to a dataset field.

Yeah. I can select values from the dropdown control which will trigger rules to show/hide visual.

BUT this is not what I wanted. I don’t want to show/hide the visual by adding additional control. I want to show/hide the visual automatically when there is data after filtering(I have a datepicker control) or not.

In your case, instead of relying on an additional control to show/hide the visual, you can leverage the same dynamic parameter with a default column value. Then, apply an “equals” rule or a similar conditional logic directly on the visual to determine its visibility based on whether there is filtered data present or not—particularly after applying your datepicker control.

This approach should help you achieve automatic visibility toggling of the visual based on the filtered dataset.

Hope this helps in your use case
Thank you

Hi @Archie1,
It’s been awhile since we last heard from you on this thread, did the solution provided above help with your case or did you have any additional questions?

If we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you

Hi @Archie1,
Since we have not heard back, I’ll go ahead and close out this topic. However, if you have any additional questions, feel free to create a new post in the community.

Thank you