I want to have two y axis with the same x axis time. For example I have one y axis with power in kW and the other y axis with SoC in percentage % ,
This is the code that I have to plot the charging profiles with multiple graphs:
with evses as (
Select evse_id
from evses
where cs_name in ($csName)
)
SELECT
$__timeGroup(time, '2m', 0) AS time,
max(power_in_w) AS EVSEID,
evse_id
FROM
(
SELECT
$__timeGroup(ts, '2m', 0) AS time,
max(p_outlet_in_w) AS power_in_w,
evse_id
FROM
charging_power_calculated p
LEFT JOIN charge_operations ops on p.transaction_id = ops.transaction_id
WHERE
$__timeFilter(ts)
AND p_outlet_in_w BETWEEN 0
AND 350000
AND ops.evse_id IN (
Select *
from evses
)
GROUP BY evse_id, time
ORDER BY evse_id, time
) temp
group by time, evse_id
ORDER BY time
And for the SoC it is:
SELECT $__timeGroup(ts, '2m', 0) as time, evse_id, soc
FROM metervalue_updates
WHERE cs_name in ($csName) AND $__timeFilter(ts)
order by ts
The graphs looks like this for the power:

And for the SoC:

How can I combine these two panels in to one and have two y axis in the same panel?
To apply two different Y-axis to your graph you need to utilize field override.