# Problem visualizing decimals in Grafana Table

**URL:** <https://community.grafana.com/t/problem-visualizing-decimals-in-grafana-table/52584>\
**Category:** Grafana\
**Created:** [August 30, 2021, 8:53am UTC](https://community.grafana.com/t/problem-visualizing-decimals-in-grafana-table/52584 "2021-08-30T08:53:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![matteodt](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@matteodt](https://community.grafana.com/u/matteodt)\
**Post date:** [August 30, 2021, 8:53am UTC](https://community.grafana.com/t/problem-visualizing-decimals-in-grafana-table/52584/1 "2021-08-30T08:53:34Z")

</div>

I have a very easy table with one time field and one numeric field.  
The data source is MS SQL Server.  
The query is:

SELECT  
$\_\_timeEpoch([Time]),  
CAST(D.[ValueInt] as float)/10 as Val  
FROM  
[HPF].[dbo].[CycleData] AS D  
WHERE  
Time = (Select MAX(Time) FROM CycleData) AND  
D.VariableName = ‘Var\_ActualPressure’

The ValueInt field is an int with value 1541, but they are decimals, so I would show 154.1.  
If I run the generated SQL with SQL server is correctly displays “154.1”  
In a Grafana table this query only displays me “154”  
If I substitute in Grafana “/10” with “/100” it shows me “15.4”, so it does not seem a “number of decimals” problem.  
I have tried to raise the “standard options → decimal” to 2 but to no avail.

Thank you very much

---

<div class="post-metadata">

**Author:** ![anon70503803](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@anon70503803](https://community.grafana.com/u/anon70503803)\
**Post date:** [August 31, 2021, 6:24pm UTC](https://community.grafana.com/t/problem-visualizing-decimals-in-grafana-table/52584/2 "2021-08-31T18:24:17Z")

</div>

Hi @matteodt

Can you share your raw query from the `inspect` drawer inside the panel dropdown? I’d be interested to see the raw response from the sql server

---

<div class="post-metadata">

**Author:** ![matteodt](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@matteodt](https://community.grafana.com/u/matteodt)\
**Post date:** [September 3, 2021, 2:23pm UTC](https://community.grafana.com/t/problem-visualizing-decimals-in-grafana-table/52584/3 "2021-09-03T14:23:48Z")

</div>

Sorry for the delay,  
The raw query is the following:

SELECT  
DATEDIFF(second, ‘1970-01-01’, [Time]) AS time,  
CAST(D.[ValueInt] as float)/10 as Val  
FROM  
[HPF].[dbo].[CycleData] AS D  
WHERE  
Time = (Select MAX(Time) FROM CycleData) AND  
D.VariableName = ‘Var\_ActualPressure’

And the value of 131.7al is correct, 131.7

On Grafana is “131”.

---

<div class="post-metadata">

**Author:** ![yuvsaha0123](https://avatars.discourse-cdn.com/v4/letter/y/db5fbb/32.png) [@yuvsaha0123](https://community.grafana.com/u/yuvsaha0123)\
**Post date:** [March 10, 2022, 10:36am UTC](https://community.grafana.com/t/problem-visualizing-decimals-in-grafana-table/52584/4 "2022-03-10T10:36:32Z")

</div>

thanks for the awesome information.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/grafana/original/2X/e/ef5308cc58c9e5a13187b5012eb99f406928462f.png) [@system](https://community.grafana.com/u/system)\
**Post date:** [August 30, 2022, 8:53am UTC](https://community.grafana.com/t/problem-visualizing-decimals-in-grafana-table/52584/5 "2022-08-30T08:53:47Z")

</div>

Closed on August 30, 2022, 8:53am UTC

This topic was automatically closed after 365 days. New replies are no longer allowed.
