# Stat Visualisation with time range

**URL:** <https://community.grafana.com/t/stat-visualisation-with-time-range/161677>\
**Category:** Stat Panel\
**Created:** [February 14, 2026, 8:57am UTC](https://community.grafana.com/t/stat-visualisation-with-time-range/161677 "2026-02-14T08:57:03Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![crashedthecymbal](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@crashedthecymbal](https://community.grafana.com/u/crashedthecymbal)\
**Post date:** [February 14, 2026, 8:57am UTC](https://community.grafana.com/t/stat-visualisation-with-time-range/161677/1 "2026-02-14T08:57:03Z")

</div>

When using a Stat Visualisation, the time range is not working as expected.  
The sample Date has 5 columns, 1st column is the date, 2nd to 4th are the numbers of Sites 1-4.  
Screenshot:

 ![Screenshot 2026-02-14 at 09.50.24](https://us1.discourse-cdn.com/grafana/original/3X/0/7/076c4f3a886234af5b7678b23e8dcc37f5ae7343.png)

 ![Screenshot 2026-02-14 at 09.50.10](https://us1.discourse-cdn.com/grafana/original/3X/d/7/d786c545f0c2b13d528c15e9b399efd55911e3b7.png)

The first row is not within the time range (last 30 days) but it is still considered in the calculations.

The calculations within the time range are only true, when the first data row is deleted from the table.

 ![Screenshot 2026-02-14 at 09.50.52](https://us1.discourse-cdn.com/grafana/original/3X/4/a/4a190031ed47e9a27cec971e608dd25e7c6da449.png)

 ![Screenshot 2026-02-14 at 09.51.04](https://us1.discourse-cdn.com/grafana/original/3X/a/c/acd088b275f274c2815c09789e5813be06db131d.png)

The time range did not change, but the calculations did, Since the 1st data row was removed. Is there a way, to use the time range option? If the time range can not be used, I guess the 1st column is useless as well?

---

<div class="post-metadata">

**Author:** ![joachimschiewek](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/joachimschiewek/32/38184_2.png) [@joachimschiewek](https://community.grafana.com/u/joachimschiewek)\
**Post date:** [February 17, 2026, 6:50am UTC](https://community.grafana.com/t/stat-visualisation-with-time-range/161677/2 "2026-02-17T06:50:06Z")

</div>

What does the query for generating the data look like?

---

<div class="post-metadata">

**Author:** ![crashedthecymbal](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@crashedthecymbal](https://community.grafana.com/u/crashedthecymbal)\
**Post date:** [February 17, 2026, 12:35pm UTC](https://community.grafana.com/t/stat-visualisation-with-time-range/161677/3 "2026-02-17T12:35:23Z")

</div>

No special query is used. Just a csv file. Where do I need to look to get the info you need?

Screenshot:

 ![Screenshot 2026-02-17 at 13.37.19](https://us1.discourse-cdn.com/grafana/original/3X/5/8/5824e1c1af3f86cb6967843fea409e623c7fb56c.png)

The transformation tab:

 ![Screenshot 2026-02-17 at 13.49.19](https://us1.discourse-cdn.com/grafana/original/3X/4/2/421b34669ca7100d3326c4526bda4003f774da00.jpeg)

I looked at the [Grafana Stat page](https://grafana.com/docs/grafana/latest/visualizations/panels-visualizations/visualizations/stat/) and created the sample data like in the post shown at the section “Time-series data“

---

<div class="post-metadata">

**Author:** ![mortensickel](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/mortensickel/32/51819_2.png) [@mortensickel](https://community.grafana.com/u/mortensickel)\
**Post date:** [February 18, 2026, 9:36am UTC](https://community.grafana.com/t/stat-visualisation-with-time-range/161677/4 "2026-02-18T09:36:04Z")

</div>

I have never used CSV-data source, so maybe a stupid question, but have you tried it in any other visualisation, e.g. a time-series plot or a table?  
When using a postgres data source (as I usually do) the data are filtered into the right time interval before it gets into grafana. I wonder if you should do filtering on date somewhere?

---

<div class="post-metadata">

**Author:** ![infofcc3](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/infofcc3/32/51248_2.png) [@infofcc3](https://community.grafana.com/u/infofcc3)\
**Post date:** [February 18, 2026, 10:17am UTC](https://community.grafana.com/t/stat-visualisation-with-time-range/161677/5 "2026-02-18T10:17:00Z")

</div>

> **[Global variables - Add variables | Grafana documentation](https://grafana.com/docs/grafana/latest/visualizations/dashboards/variables/add-template-variables/#global-variables)**
>
> The following table lists the types of variables shipped with Grafana. | Learn about the types of variables you can add to dashboards and how

---

<div class="post-metadata">

**Author:** ![crashedthecymbal](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@crashedthecymbal](https://community.grafana.com/u/crashedthecymbal)\
**Post date:** [February 18, 2026, 12:00pm UTC](https://community.grafana.com/t/stat-visualisation-with-time-range/161677/6 "2026-02-18T12:00:26Z")

</div>

If you use the same data and source in a heatmap, the date range works. So that’s why I am wondering why it’s not working on the Stat visualisation.

I have tried with and without datatime transformation, same result on Stat vis. I can type in a full timestamp and use that without datetime transformation, same result.

Since all the real data files are in csv format, I thought, I spare myself the step to import them into db like influx.

---

<div class="post-metadata">

**Author:** ![crashedthecymbal](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@crashedthecymbal](https://community.grafana.com/u/crashedthecymbal)\
**Post date:** [February 18, 2026, 12:14pm UTC](https://community.grafana.com/t/stat-visualisation-with-time-range/161677/7 "2026-02-18T12:14:39Z")

</div>

Update:

Sorry, it was not refreshed at time I was looking at the screen. Still not working with csv files. I guess I will use a database.

–

Thank you! That’s it.

Looks like the Timestamp needs to “2026-01-30T00:00:00.0Z“ not just “2026-01-30“

---

<div class="post-metadata">

**Author:** ![infofcc3](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/infofcc3/32/51248_2.png) [@infofcc3](https://community.grafana.com/u/infofcc3)\
**Post date:** [February 19, 2026, 9:01am UTC](https://community.grafana.com/t/stat-visualisation-with-time-range/161677/8 "2026-02-19T09:01:57Z")

</div>

Thanks for the update. Yes, Grafana requires the full ISO timestamp format with time and timezone. Glad you found the issue!

---

<div class="post-metadata">

**Author:** ![crashedthecymbal](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@crashedthecymbal](https://community.grafana.com/u/crashedthecymbal)\
**Post date:** [February 19, 2026, 12:48pm UTC](https://community.grafana.com/t/stat-visualisation-with-time-range/161677/9 "2026-02-19T12:48:03Z")

</div>

I send the reply too early. Th issue is still there in Stat visualisation with the csv file. A full timestamp or an EPOCH time does not help to make use of the set date range. While it is working on the heatmap, it is not working on the Stat

It looks like the range is only applied to the graph in the background, but not the percentage calculations and the trend arrow up/down.

TimeRange set to 30 days, the graphs (in the red rectangles) are visible

 ![Screenshot 2026-02-19 at 13.52.29](https://us1.discourse-cdn.com/grafana/original/3X/b/f/bfd2d2d631774bfc219b67b982b565866fdaf223.png)

The range set to 7 days, the graphs are gone, but the calculations stay the same. So the date is working, but not the percentage and arrow up/down trend.

 ![Screenshot 2026-02-19 at 13.53.02](https://us1.discourse-cdn.com/grafana/original/3X/4/c/4cf4a69cc2ef83c53b1343b1d4112674af65a4b7.png)
