Hello,
I have timeseries snapshots like:
SnapId, Time, Symbol, PnL
1, 10/1/2025 08:00:00, MSFT, -20
1, 10/1/2025 08:00:00, IBM, 50
2, 10/1/2025 08:15:00, IBM, 25
2, 10/1/2025 08:15:00, MSFT, 200
3, 10/1/2025 08:30:00, IBM, 100
3, 10/1/2025 08:30:00, MSFT, -100
I want to calculate chart with delta PnL differences between different snapshots at symbol level between 2 snapshots which are 30 mins apart. So, here the delta PnL between snapshot 3 and 1 (since they are 30 mins apart) would be: IBM: 75, MSFT: 50, AAPL: -80 . So now, you can imagine I can have a table with Symbol, Delta PnL
Symbol, Delta PnL
IBM, 75
MSFT, 50
AAPL, -80
The time comparison has to be between time when user opens the dashboard and minus 30 mins.
How can I achieve this?
Thank you.