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

**URL:** <https://forum.opensearch.org/t/show-data-in-a-dashboard-visualization-only-if-a-condition-is-met-anonymization-of-data/17592>\
**Category:** OpenSearch Dashboards\
**Created:** [January 26, 2024, 10:00am UTC](https://forum.opensearch.org/t/show-data-in-a-dashboard-visualization-only-if-a-condition-is-met-anonymization-of-data/17592 "2024-01-26T10:00:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JMDPuma](https://avatars.discourse-cdn.com/v4/letter/j/76d3ee/32.png) [@JMDPuma](https://forum.opensearch.org/u/JMDPuma)\
**Post date:** [January 26, 2024, 10:00am UTC](https://forum.opensearch.org/t/show-data-in-a-dashboard-visualization-only-if-a-condition-is-met-anonymization-of-data/17592/1 "2024-01-26T10:00:51Z")

</div>

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.
