# Stat panel with fields selected by Regular expression

**URL:** <https://community.grafana.com/t/stat-panel-with-fields-selected-by-regular-expression/112744>\
**Category:** Dashboards\
**Tags:** polystat, dashboard, expressions\
**Created:** [January 24, 2024, 4:03pm UTC](https://community.grafana.com/t/stat-panel-with-fields-selected-by-regular-expression/112744 "2024-01-24T16:03:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![markfree](https://avatars.discourse-cdn.com/v4/letter/m/dfb087/32.png) [@markfree](https://community.grafana.com/u/markfree)\
**Post date:** [January 24, 2024, 4:03pm UTC](https://community.grafana.com/t/stat-panel-with-fields-selected-by-regular-expression/112744/1 "2024-01-24T16:03:29Z")

</div>

_Grafana 10.0.3_  
_Zabbix data-source 4.4.0_

* * *
  

Hey guys.  
I’m trying to display the status of several monitored Jobs using the Stat panel.  
To do this, I have created a query that can return various job-related data.  
 ![job_query](https://us1.discourse-cdn.com/grafana/original/3X/0/0/009aa6c4e0f88b5608048b9d10e5557a4a76e3c8.png)

The idea is to use the same query for multiple panels, where only the fields displayed would change.

In “_ **Value options** _” I can “select the **fields** that should be included in the panel”.

 ![stat_all_fields](https://us1.discourse-cdn.com/grafana/original/3X/1/6/164fe1b1a6d1af80ab13351adc51aee9c513080d.png)

Selecting **`All Fields`** or **`Numeric Fields`** are somewhat limited options.  
So, I found out that a limited Regular Expression can also be used in cases where there are many fields. _BTW, I could not find this information in the documentation._

In my example, I was able to use the expression **`/Status - ETL.*/`** to display only the **field names** for this first panel.  
 ![stat_fields_regex(1)](https://us1.discourse-cdn.com/grafana/original/3X/f/d/fd85865cf1b39d0220c092dcdd6e9f0926912e5a.png)

Now, my hope is to extend the expression to filter the fields without displaying the “Status” term.  
I wish it was something like this:

> **`/Status - (ETL.*)/$1/`**

But of course, this does not work out. It seems that the field does not support capture groups.

Any thoughts on this matter?

---

<div class="post-metadata">

**Author:** ![markfree](https://avatars.discourse-cdn.com/v4/letter/m/dfb087/32.png) [@markfree](https://community.grafana.com/u/markfree)\
**Post date:** [January 25, 2024, 12:07pm UTC](https://community.grafana.com/t/stat-panel-with-fields-selected-by-regular-expression/112744/2 "2024-01-25T12:07:35Z")

</div>

I could not use an extended regex in the `Fields` field.

But, using a `Filter by name` transformation helped me to filter the displayed fields.  
 ![filter_name_regex](https://us1.discourse-cdn.com/grafana/original/3X/a/6/a65048306738fe6e2f25a540bd2e3c7cdbda0757.png)
