# Flux: Label Description

**URL:** <https://community.grafana.com/t/flux-label-description/156774>\
**Category:** Grafana\
**Tags:** influxdb, templating, query-help, dashboard\
**Created:** [August 26, 2025, 3:04pm UTC](https://community.grafana.com/t/flux-label-description/156774 "2025-08-26T15:04:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![larsmueller2](https://avatars.discourse-cdn.com/v4/letter/l/5e9695/32.png) [@larsmueller2](https://community.grafana.com/u/larsmueller2)\
**Post date:** [August 26, 2025, 3:04pm UTC](https://community.grafana.com/t/flux-label-description/156774/1 "2025-08-26T15:04:50Z")

</div>

Hi Together,

I have an Issue with my grafana Table. I will add Instead of the Time stamp the cw (calendar week) for each pillars (for examble cw2, cw3 …) . Is this possible? I am using Influx DB2.x

Thanks

Bye

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/5/1/515384d27976bcc11c5c28c38d1121288f44aaf9.png)

```auto
import "timezone"
option location = timezone.location(name: "Europe/Berlin")
 
 
from(bucket: "My_DB")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "smartmeter.0.1-0:1_8_0__255.value")
  |> filter(fn: (r) => r["_field"] == "value")
  |> aggregateWindow(every: 1w, fn: last, timeSrc: "_start", createEmpty: false, offset: -3d)
  |> difference(nonNegative: true, columns: ["_value"])
 
  |> map(fn: (r) => ({
        r with 
        kw: string(v: time(v: r._time))
     }))
  |> yield(name: "weekly_mean")

```

---

<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:** [August 27, 2025, 7:16am UTC](https://community.grafana.com/t/flux-label-description/156774/2 "2025-08-27T07:16:14Z")

</div>

Hi @larsmueller2 ,

I have resolved the issue by following the steps outlined below:

**Step 1.** Created a new bucket and inserted dummy data.

**Step 2.** Integrated InfluxDB with Grafana.

**Step 3.** Configured the panel query

```auto
import "date"
from(bucket: "Dummy_data")
  |> range(start: -0)
  |> filter(fn: (r) => r["_field"] == "value")
  |> aggregateWindow(every: 1w, fn: last, timeSrc: "_start", createEmpty: false)
  |> difference(nonNegative: true, columns: ["_value"])
  |> map(fn: (r) => ({
        r with 
        week_label: "CW " + string(v: date.week(t: r._time))
     }))

```

**Final output :-**

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/3/9/3925e43fa609aada9b793d7620df9e13b647ba4a.png)

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

---

<div class="post-metadata">

**Author:** ![larsmueller2](https://avatars.discourse-cdn.com/v4/letter/l/5e9695/32.png) [@larsmueller2](https://community.grafana.com/u/larsmueller2)\
**Post date:** [August 27, 2025, 6:44pm UTC](https://community.grafana.com/t/flux-label-description/156774/3 "2025-08-27T18:44:40Z")

</div>

Thanks for your Great Help. Problem is solved. You are the best 😀

---

<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:** [August 28, 2025, 4:02am UTC](https://community.grafana.com/t/flux-label-description/156774/4 "2025-08-28T04:02:43Z")

</div>

Hi @larsmueller2,  
If your issue has been resolved, please mark the solution accordingly. Thank you!
