Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Off Topic
    4. Grafana
    5. Label Beschriftung in Grafana mit InfluxDB2 als KW anzeigen

    NEWS

    • Monatsrückblick – September 2025

    • Neues Video "KI im Smart Home" - ioBroker plus n8n

    • Neues Video über Aliase, virtuelle Geräte und Kategorien

    Label Beschriftung in Grafana mit InfluxDB2 als KW anzeigen

    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sral74 last edited by

      Hallo zusmammen,

      wie kann ich mir statt Datum und Uhrzeit nur die KW bei einem Wochnchart für Stromverbrauch anzeigen.

      64887867-8121-4ad3-a64f-eb4076b892eb-image.png

      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")
      

      Danke
      Gruß

      1 Reply Last reply Reply Quote 0
      • First post
        Last post

      Support us

      ioBroker
      Community Adapters
      Donate

      1.0k
      Online

      32.2k
      Users

      80.9k
      Topics

      1.3m
      Posts

      1
      1
      59
      Loading More Posts
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      Community
      Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
      The ioBroker Community 2014-2023
      logo