# Stat Panel with variables with expression on several queries display NaN

**URL:** <https://community.grafana.com/t/stat-panel-with-variables-with-expression-on-several-queries-display-nan/77074>\
**Category:** Stat Panel\
**Tags:** dashboard-variables, elasticsearch\
**Created:** [November 30, 2022, 2:17pm UTC](https://community.grafana.com/t/stat-panel-with-variables-with-expression-on-several-queries-display-nan/77074 "2022-11-30T14:17:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gstephant](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/gstephant/32/28055_2.png) [@gstephant](https://community.grafana.com/u/gstephant)\
**Post date:** [November 30, 2022, 2:17pm UTC](https://community.grafana.com/t/stat-panel-with-variables-with-expression-on-several-queries-display-nan/77074/1 "2022-11-30T14:17:42Z")

</div>

Hello,

I want to use a stat panel to display the result of an expression made over 3 different elasticsearch queries. My grafana version : 8.4.6 . In the following elements I simplified my problem with only one query and one expression.

Those queries use a dashboard variable (a map key value)

The query alone with the variable works fine  
interval is set to 1 year in order to have only one bucket as result

The query plus the expression A+100 does not display anything. I dont have values for the first query anymore.

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/0/a/0a360634dd29a58d4f8bb3d719c983c2012d6ba8.png)

They query without the variable plus the expression works fine

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/f/8/f830e139cdc593595019ce12ce6f71797d34976e.png)

Do you guys have an idea of what to do ? Is this a bug , a limitation of grafana or is it me that is not correctly using grafana ?

Thx for the help !
