Is it possible to calculate two date histograms in metric? (want to have the duration)

Is there a way to display calculations between two “datehistograms” in the panel?
I have two values in one JSON.

a statement object: {
start: any start timestamp,
start: any end timestamp

and I want to know the duration between both timestamps and then display it in the panel

in the metrics, I can use statement.start and statement.end to access it.