# Kibana canvas "compare" function (expression language)

**URL:** <https://discuss.elastic.co/t/kibana-canvas-compare-function-expression-language/294484>\
**Category:** Kibana\
**Tags:** canvas\
**Created:** [January 15, 2022, 3:38pm UTC](https://discuss.elastic.co/t/kibana-canvas-compare-function-expression-language/294484 "2022-01-15T15:38:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![rusty\_cole](https://avatars.discourse-cdn.com/v4/letter/r/a4c791/32.png) [@rusty\_cole](https://discuss.elastic.co/u/rusty_cole)\
**Post date:** [January 16, 2022, 7:08am UTC](https://discuss.elastic.co/t/kibana-canvas-compare-function-expression-language/294484/2 "2022-01-16T07:08:10Z")

</div>

Found the following post confirming its a bug.

> [@Canvas switch case not working after first case](https://discuss.elastic.co/t/canvas-switch-case-not-working-after-first-case/288627):
>
> Hi, I am trying to use switch cases in canvas kibana (7.14) but it's not working. I tried to use the demo data with the following code: demodata | mapColumn "project\_map" fn=${getCell "project" | switch {case if={compare eq to="kibana"} then="kibana"} {case if={compare eq to="elasticsearch"} then="elasticsearch"} {case if={compare eq to="beats"} then="beats"} default="other" } | table | render and ended up with this result: [image] It appears that after the …

---

_[View the full topic](https://discuss.elastic.co/t/kibana-canvas-compare-function-expression-language/294484)._
