title: Why does grafana display NaN for values that are clearly integers?
body: <p>I created a SQL query that counts the number of servers running test jobs on a specific Jenkins server at a specified time.  I'm trying to chart it on Grafana but for some reason, it's displaying the value as NaN.</p>
  <p>The data source is a MySQL server.  I'm running Grafana version 8.1.5.  I went on the server (phpMyAdmin) to check the results of the query and I can see numbers.</p>
  <p><a href="https://i.stack.imgur.com/XcZlQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XcZlQ.png" alt="enter image description here" /></a></p>
  <p>When we look at the grafana chart/panel, the bars on the chart look like it matches the values, but the chart shows NaN instead of the value.</p>
  <p><a href="https://i.stack.imgur.com/hLZVp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hLZVp.png" alt="enter image description here" /></a></p>
  <p>What setting do I need to change so that it can print the numeric value on the chart instead of displaying NaN?</p>
  <p>EDIT: Looks like I didn't include enough info to my question.</p>
  <p>Here's the query that's used, although, I don't know how feasible it is to include the tables with data to demo the issue:</p>
  <blockquote>
  <p>SELECT COUNT(DISTINCT(tb_name)) as val, jenkins FROM (
  SELECT
  hw.collected_date AS mytime,
  hw.jenkins AS jenkins,
  hw.name AS tb_name
  FROM hw_report as hw LEFT OUTER JOIN jenkins_owner jo
  ON hw.jenkins = jo.jenkins
  WHERE jo.org IN ('Enterprise Readiness')) as y
  WHERE mytime = '2021-12-03 00:00:00'
  GROUP BY jenkins
  HAVING count(distinct(tb_name)) &gt; '0'</p>
  </blockquote>
  <p>Here are screenshots of my panel.  The &quot;Show values&quot; setting is set to &quot;Always&quot;, which II assume should show the values.</p>
  <p><a href="https://i.stack.imgur.com/NVKap.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NVKap.png" alt="enter image description here" /></a></p>
  <p>One thing I noticed is when I hover over the bar, it shows</p>
  <pre><code>COUNT(DISTINCT(name_cnt))
  </code></pre>
  <p>instead of a numeric value.  Not sure if this is indicative of anything.  I checked other charts in the dashboard that someone created and their bars either have a numeric value or it's just a column name (like name_cnt)</p>