# Create a rule / alert using dashboard formula

**URL:** https://discuss.elastic.co/t/create-a-rule-alert-using-dashboard-formula/353952
**Category:** Kibana
**Created:** [February 23, 2024, 8:25am UTC](https://discuss.elastic.co/t/create-a-rule-alert-using-dashboard-formula/353952 "2024-02-23T08:25:58Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Samuele\_Lolli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samuele_lolli/32/107848_2.png) [@Samuele\_Lolli](https://discuss.elastic.co/u/Samuele_Lolli)
#### Post date: [February 23, 2024, 8:25am UTC](https://discuss.elastic.co/t/create-a-rule-alert-using-dashboard-formula/353952/1 "2024-02-23T08:25:58Z")

</div>

Hi, i need to create an alert using the rule page but im not able to replicate the formula that im using on the dashboard.  
Someone can help me?

```auto
unique_count(event.metadata.correlationId, kql='
event.metadata.tracePoint : "END"  
and ((event.logMessage : MESSAGE*) or (event.logMessage : "MESSAGE"))') / unique_count(event.metadata.correlationId,
kql='event.metadata.tracePoint : "START"  
and event.logMessage : MESSAGE*')

```

Thanks in advance

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [March 22, 2024, 8:26am UTC](https://discuss.elastic.co/t/create-a-rule-alert-using-dashboard-formula/353952/2 "2024-03-22T08:26:30Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
