# Conditional formatting of the header of a table

**URL:** https://discuss.elastic.co/t/conditional-formatting-of-the-header-of-a-table/319745
**Category:** Kibana
**Tags:** canvas
**Created:** [November 24, 2022, 11:21am UTC](https://discuss.elastic.co/t/conditional-formatting-of-the-header-of-a-table/319745 "2022-11-24T11:21:06Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Gianluca\_De\_Pasquale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gianluca_de_pasquale/32/101527_2.png) [@Gianluca\_De\_Pasquale](https://discuss.elastic.co/u/Gianluca_De_Pasquale)
#### Post date: [November 24, 2022, 11:21am UTC](https://discuss.elastic.co/t/conditional-formatting-of-the-header-of-a-table/319745/1 "2022-11-24T11:21:06Z")

</div>

Hi team,  
with the following code I obtained the conditional formatting of a table based on the value of the field "vendor\_name". Is it possible to format header separately from the data in the table?

thanks,  
g

```auto
kibana
| selectFilter group="cellnamegroup2"
| essql query="SELECT cellname, vendor_name, region FROM table"
| table paginate=false font={font family="'Helvetica Neue', Helvetica, Arial, sans-serif" color={
if {any {getCell "vendor_name" | compare "eq" to='N'}} then={string "Red"} else={string "Green"}
} size=15 align="right" weight="normal" underline=false italic=false} showHeader=true
//value="hidden"
| render 
css={string ".canvasRenderEl{
  display: flex;
  align-items: center;
  padding: 10px;
  height: 50px;
  background-color: #e4e4e4;
  border:2px solid #ec0028;
border-radius: 20px;
visibility:visible;
}"}
containerStyle={containerStyle}

```

---

<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: [December 22, 2022, 11:21am UTC](https://discuss.elastic.co/t/conditional-formatting-of-the-header-of-a-table/319745/2 "2022-12-22T11:21:40Z")

</div>

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