Comparing two different time series data from loki on a single time-series graph

I am trying to compare the CPU performance metrics collected at two different timestamps using a Time-Series graph. I want the output as given below :

The data are collected from the LOKI logs ( json format). Please help. Also, suggest an alternative approach to do this if the said requirement can’t be done on the grafana at the moment. I am using grafana version 10.x