To get the percentage of SolarEnergy / ConsumedEnergy, I´ve implemented it with a transform:
Mode: Binary operation
Operation: SolarEnergy / TotalConsumption
What happened?
The energy consumption and production of the selected time range works well as expected.
But the percentage of SolarEnergy / ConsumedEnergy does not show the desired result. The transform calculates the percentage per day in a new column. The “value options” Calculate Difference, then gives the difference between the first and the last percentage value.
What did you expect to happen?
What I like to have is the SolarIndex = SolarEnergy / ConsumedEnergy over the full selected time range (average).
Can you copy/paste the configuration(s) that you are having problems with?
see above
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
No
Did you follow any online instructions? If so, what is the URL?
No
Since I alredy spend hours with this, I would be really happy if anyone can give an hint how to solve it.
Rather than working with Grafana transformations, let’s move to Influx Data Explorer and write your query there and view the raw data output (switch toggle).
Then let’s try to create a map function to do the math you desire.
Can you paste the output (screenshot) of your query as rendered with raw data in Influx Data Explorer?
Unfortuantely two tables where generated.
I played arround to use the map function.
First of all I calculated the differences of the totalizer values per day and the summed it up.
This worked pretty fine.
Then I tried to calculated the remaining values with map(). But I did not manage to use values from both tables. Is there a way to do so? Maybe merge both tables?
Hi,
did try to implement the join function with 2 tables, but did not really work as expected.
But I can use the query without joining the tables and just use the difference and culumlativeSum. Based on this query I can easily do the math with Grafana transforms.
Thank you so much for your support, I was able to solve my problem.
Regards
Reinhard