# How to use condition in canvas markdown render

**URL:** <https://discuss.elastic.co/t/how-to-use-condition-in-canvas-markdown-render/319069>\
**Category:** Kibana\
**Tags:** canvas\
**Created:** [November 16, 2022, 11:33am UTC](https://discuss.elastic.co/t/how-to-use-condition-in-canvas-markdown-render/319069 "2022-11-16T11:33:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tofpad](https://avatars.discourse-cdn.com/v4/letter/t/a88e57/32.png) [@tofpad](https://discuss.elastic.co/u/tofpad)\
**Post date:** [November 16, 2022, 11:33am UTC](https://discuss.elastic.co/t/how-to-use-condition-in-canvas-markdown-render/319069/1 "2022-11-16T11:33:09Z")

</div>

Hi all,  
I want to hide a part of the content of a markdown render if there are no entries in my query result. For that i try tu use if in my markdown but i can't make it to work.

```auto
filters
| essql 
  query={string "select \"services.status globule.funnel_status\" as status, \"services.custom_tags_suffix_service.Qualification d'usage globule\" as qualif, \"services.referent_esea globule.name\" as ref 
from reso_professionnel_v2 where id='" {urlparam param="idRESO" default={var "idPro"}} "' group by status, ref, qualif"}
| markdown 
  "
PAACO :

{{#each rows}}
{if rowCount|compare \"eq\" to=0} then=""
else= {{status}}, <projets a venir>, {{qualif}}, ref: {{ref}}
{{/each}}"
| render

```

Thanks for your help.

---

<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 14, 2022, 11:33am UTC](https://discuss.elastic.co/t/how-to-use-condition-in-canvas-markdown-render/319069/2 "2022-12-14T11:33:23Z")

</div>

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