# Facet operator doesn't work in Kibana Vega

**URL:** https://discuss.elastic.co/t/facet-operator-doesnt-work-in-kibana-vega/237753
**Category:** Kibana
**Created:** [June 19, 2020, 7:38am UTC](https://discuss.elastic.co/t/facet-operator-doesnt-work-in-kibana-vega/237753 "2020-06-19T07:38:05Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![marrel](https://avatars.discourse-cdn.com/v4/letter/m/a4c791/32.png) [@marrel](https://discuss.elastic.co/u/marrel)
#### Post date: [June 19, 2020, 7:38am UTC](https://discuss.elastic.co/t/facet-operator-doesnt-work-in-kibana-vega/237753/1 "2020-06-19T07:38:05Z")

</div>

Hello!! 👋

I have found that not all Multi-View Displays, such as Faceting (Trellis Plot / Small Multiples), work properly in Kibana Vega. To be more specific, for example I am running the following code in vega visualization in Kibana:

> { "$schema": "[https://vega.github.io/schema/vega-lite/v4.json](https://vega.github.io/schema/vega-lite/v4.json)",  
> "name": "trellis\_barley",
> 
> "data": {"url": "[https://vega.github.io/editor/data/barley.json](https://vega.github.io/editor/data/barley.json)"},
> 
> "mark": "point",
> 
> "height": {"step": 12},
> 
> "encoding": {
> 
> ```
> "facet": {
> 
> "field": "site",
> 
> "type": "ordinal",
> 
> "columns": 2,
> 
> "sort": {"op": "median", "field": "yield"} },
> 
> "x": {
> 
> "aggregate": "median",
> 
> "field": "yield",
> 
> "type": "quantitative",
> 
> "scale": {"zero": false} },
> 
> "y": {
> 
> "field": "variety",
> 
> "type": "ordinal",
> 
> "sort": "-x" },
> 
> "color": {"field": "year", "type": "nominal"} }
> 
> ```
> 
> }

The facet operator also doesn't work in Kibana Vega, but in the online vega editor works perfectly.

Please look the following screenshots.

**1. Screenshot from kibana vega:**

 ![kibana vega](https://us1.discourse-cdn.com/elastic/original/3X/6/1/618034054988419ce5e7237c24ed5ecf0b72750d.png)

**2. Screenshot from online vega editor:**

 ![vega online](https://us1.discourse-cdn.com/elastic/original/3X/7/b/7bd858d2ed32db9849f83a40d35e1e2794512437.png)

Have you any idea how can I fix it?  
Thank you very much.

---

<div class="post-metadata">

### Author: ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)
#### Post date: [June 24, 2020, 2:44pm UTC](https://discuss.elastic.co/t/facet-operator-doesnt-work-in-kibana-vega/237753/2 "2020-06-24T14:44:26Z")

</div>

The faceting operator was added in a more recent version of Vega- we have upgraded Vega for the future release of 7.9, but currently versions of the stack don't support this. You may be able to modify the version of Kibana that you are running, or use a custom plugin, but those are the only workarounds.

---

<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: [July 22, 2020, 2:44pm UTC](https://discuss.elastic.co/t/facet-operator-doesnt-work-in-kibana-vega/237753/3 "2020-07-22T14:44:30Z")

</div>

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