Show data in a Dashboard/Visualization only if a condition is met - Anonymization of Data

Hi together,

We are migrating from ElasticSearch to OpenSearch Service and we have to recreate all the dashboards. In one of the dashboards we have a visualization that MUST only show the data/graphic if a condition is met.

In ElasticSearch, I am able to “filter” the data in the visualization while using a formula. Unfortunately, this feature doesn´t exist in OpenSearch Dashboards.

Do you have any idea of how I can create such a “filter” for the visualization?

More context to this question:
we have docs containing the stock information of different bicycles.
The bicycles are owned by different dealers.
Each dealer can set their own price for each bicycle.

I want a visualization that shows the average price of a bicycle model within the stock, BUT this information can only be shown if at least 5 dealers have the same bicycle model in stock .

This condition (at least 5 dealers have the same model) must be met due to a PRIVACY POLICY. So, if the condition is not met, the visualization should not show any information.

The amount of available dealers and bicycle models will be dynamic since they will depend on the Date range selected.

Is this possible?
If yes, could you please give me a hint.

Thank you in advance.