Grafana x InfluxDB: show the difference between the current and past week

Hi everyone :slight_smile:

I have a question regarding the optimization of my querys for the geomap panel.

  • First of all i am running a grafana cloud instance (version 8.5.2.) on my linux machine.
  • I want to create a comparison between two timestamps of my measured values. The data strucutre of my influxdb-bucket is looking like this:
  1. "example-bucket":
  2. _measurement: (saved as a variable inside grafana) list of sensors
  3. _tags=(‚Äústateofactive‚ÄĚ, ‚Äústateofbattery‚ÄĚ): 2 tags which show if the sensor is active and the battery percentage (are not really necessary for the geomap visualization)
  4. _field=(‚ÄúLongitude‚ÄĚ, ‚ÄúLatitude‚ÄĚ, ‚Äúsensorvalue‚ÄĚ): 3 fields which show long and lat as well as the measurement of the specific sensor
  • Right now i got a panel which shows the graph from the previous and current week (-14d to -7d and -7d till today) :

  • But with this i can only try to figure out how my data has changed compared to the week before. In my case i want to have some kind of indicator-panel which shows me that the values dropped x% so that i directly have a value which gives me a exact number or percentage of how my sensors are acting compared to the previous week:

  • Does anyone have a tip on how to achieve tasks like this ?

Thank you in advance :slight_smile: Greetings Grafu

you should probably do all of this in flux and let grafana do what it do best, you feel me playa :smile_cat: