PureBluff
Board Regular
- Joined
- Apr 4, 2014
- Messages
- 174
- Office Version
- 2016
- Platform
- Windows
- Mobile
Good morning all,
Here in the UK, we have an energy provider (Octopus) who offer fluctuating rates depending on the tariff you're on.
The key ones here are:
Agile: The rate changes every 30 minutes
Tracker: The rate changes daily
Naturally, in the UK, we also have British Summer Time and Greenwich Mean Time - however Octopus on the whole use UTC. This is where my issue arises.
The consumption data from their API looks like this, note on the 26th March 23 going into the 27th, the interval date adds in the +01:00 hour:
The pricing file for Agile follows this format:
and the tracker following this format:
For reference, the data are all collated from an API feed. The region and sheetname are currently taken from an indirect on Sheet "Config" and in cells C2 and C3 respectively
I wish to apply the correct pricing within the consumption sheet, for example
Agile:
However, on the last 2 rows, this obviously has nothing to index against, but otherwise it works well.
Any idea's on how I can alter this to incorporate the interval_from change without using a row offset of 2? as that obviously fails on the last two 30 minute segments
And for tracker pricing, I don't know how to capture the change in the higlighted sections,
I have tried offsets against the interval date, but they break, because I was using
- which works for everything but the changeover from the 26th to the 27th.
Example of the formula I was trying to get to work but it has defeated me
This works, until the changeover as depicted below:
[/code]
Here in the UK, we have an energy provider (Octopus) who offer fluctuating rates depending on the tariff you're on.
The key ones here are:
Agile: The rate changes every 30 minutes
Tracker: The rate changes daily
Naturally, in the UK, we also have British Summer Time and Greenwich Mean Time - however Octopus on the whole use UTC. This is where my issue arises.
The consumption data from their API looks like this, note on the 26th March 23 going into the 27th, the interval date adds in the +01:00 hour:
consumption | interval_start | interval_end |
0.226 | 2023-03-24T23:00:00Z | 2023-03-24T23:30:00Z |
0.209 | 2023-03-24T23:30:00Z | 2023-03-25T00:00:00Z |
0.211 | 2023-03-25T00:00:00Z | 2023-03-25T00:30:00Z |
0.199 | 2023-03-25T00:30:00Z | 2023-03-25T01:00:00Z |
0.218 | 2023-03-25T01:00:00Z | 2023-03-25T01:30:00Z |
0.194 | 2023-03-25T01:30:00Z | 2023-03-25T02:00:00Z |
0.225 | 2023-03-25T02:00:00Z | 2023-03-25T02:30:00Z |
0.194 | 2023-03-25T02:30:00Z | 2023-03-25T03:00:00Z |
0.219 | 2023-03-25T03:00:00Z | 2023-03-25T03:30:00Z |
0.209 | 2023-03-25T03:30:00Z | 2023-03-25T04:00:00Z |
0.211 | 2023-03-25T04:00:00Z | 2023-03-25T04:30:00Z |
0.225 | 2023-03-25T04:30:00Z | 2023-03-25T05:00:00Z |
0.203 | 2023-03-25T05:00:00Z | 2023-03-25T05:30:00Z |
0.225 | 2023-03-25T05:30:00Z | 2023-03-25T06:00:00Z |
0.193 | 2023-03-25T06:00:00Z | 2023-03-25T06:30:00Z |
0.206 | 2023-03-25T06:30:00Z | 2023-03-25T07:00:00Z |
0.353 | 2023-03-25T07:00:00Z | 2023-03-25T07:30:00Z |
0.212 | 2023-03-25T07:30:00Z | 2023-03-25T08:00:00Z |
0.657 | 2023-03-25T08:00:00Z | 2023-03-25T08:30:00Z |
0.3 | 2023-03-25T08:30:00Z | 2023-03-25T09:00:00Z |
0.243 | 2023-03-25T09:00:00Z | 2023-03-25T09:30:00Z |
0.28 | 2023-03-25T09:30:00Z | 2023-03-25T10:00:00Z |
0.354 | 2023-03-25T10:00:00Z | 2023-03-25T10:30:00Z |
0.122 | 2023-03-25T10:30:00Z | 2023-03-25T11:00:00Z |
0.047 | 2023-03-25T11:00:00Z | 2023-03-25T11:30:00Z |
0.457 | 2023-03-25T11:30:00Z | 2023-03-25T12:00:00Z |
0.362 | 2023-03-25T12:00:00Z | 2023-03-25T12:30:00Z |
0.384 | 2023-03-25T12:30:00Z | 2023-03-25T13:00:00Z |
0.461 | 2023-03-25T13:00:00Z | 2023-03-25T13:30:00Z |
0.55 | 2023-03-25T13:30:00Z | 2023-03-25T14:00:00Z |
0.397 | 2023-03-25T14:00:00Z | 2023-03-25T14:30:00Z |
1.031 | 2023-03-25T14:30:00Z | 2023-03-25T15:00:00Z |
0.576 | 2023-03-25T15:00:00Z | 2023-03-25T15:30:00Z |
0.398 | 2023-03-25T15:30:00Z | 2023-03-25T16:00:00Z |
0.041 | 2023-03-25T16:00:00Z | 2023-03-25T16:30:00Z |
0.073 | 2023-03-25T16:30:00Z | 2023-03-25T17:00:00Z |
0.492 | 2023-03-25T17:00:00Z | 2023-03-25T17:30:00Z |
0.408 | 2023-03-25T17:30:00Z | 2023-03-25T18:00:00Z |
0.873 | 2023-03-25T18:00:00Z | 2023-03-25T18:30:00Z |
0.824 | 2023-03-25T18:30:00Z | 2023-03-25T19:00:00Z |
0.609 | 2023-03-25T19:00:00Z | 2023-03-25T19:30:00Z |
0.433 | 2023-03-25T19:30:00Z | 2023-03-25T20:00:00Z |
0.45 | 2023-03-25T20:00:00Z | 2023-03-25T20:30:00Z |
0.435 | 2023-03-25T20:30:00Z | 2023-03-25T21:00:00Z |
0.505 | 2023-03-25T21:00:00Z | 2023-03-25T21:30:00Z |
0.385 | 2023-03-25T21:30:00Z | 2023-03-25T22:00:00Z |
0.372 | 2023-03-25T22:00:00Z | 2023-03-25T22:30:00Z |
0.354 | 2023-03-25T22:30:00Z | 2023-03-25T23:00:00Z |
0.382 | 2023-03-25T23:00:00Z | 2023-03-25T23:30:00Z |
0.316 | 2023-03-25T23:30:00Z | 2023-03-26T00:00:00Z |
0.345 | 2023-03-26T00:00:00Z | 2023-03-26T00:30:00Z |
0.316 | 2023-03-26T00:30:00Z | 2023-03-26T02:00:00+01:00 |
0.343 | 2023-03-26T02:00:00+01:00 | 2023-03-26T02:30:00+01:00 |
0.318 | 2023-03-26T02:30:00+01:00 | 2023-03-26T03:00:00+01:00 |
0.34 | 2023-03-26T03:00:00+01:00 | 2023-03-26T03:30:00+01:00 |
0.317 | 2023-03-26T03:30:00+01:00 | 2023-03-26T04:00:00+01:00 |
0.342 | 2023-03-26T04:00:00+01:00 | 2023-03-26T04:30:00+01:00 |
0.315 | 2023-03-26T04:30:00+01:00 | 2023-03-26T05:00:00+01:00 |
0.346 | 2023-03-26T05:00:00+01:00 | 2023-03-26T05:30:00+01:00 |
0.315 | 2023-03-26T05:30:00+01:00 | 2023-03-26T06:00:00+01:00 |
0.345 | 2023-03-26T06:00:00+01:00 | 2023-03-26T06:30:00+01:00 |
0.316 | 2023-03-26T06:30:00+01:00 | 2023-03-26T07:00:00+01:00 |
0.341 | 2023-03-26T07:00:00+01:00 | 2023-03-26T07:30:00+01:00 |
0.309 | 2023-03-26T07:30:00+01:00 | 2023-03-26T08:00:00+01:00 |
0.348 | 2023-03-26T08:00:00+01:00 | 2023-03-26T08:30:00+01:00 |
0.34 | 2023-03-26T08:30:00+01:00 | 2023-03-26T09:00:00+01:00 |
0.427 | 2023-03-26T09:00:00+01:00 | 2023-03-26T09:30:00+01:00 |
0.401 | 2023-03-26T09:30:00+01:00 | 2023-03-26T10:00:00+01:00 |
0.432 | 2023-03-26T10:00:00+01:00 | 2023-03-26T10:30:00+01:00 |
0.361 | 2023-03-26T10:30:00+01:00 | 2023-03-26T11:00:00+01:00 |
0.364 | 2023-03-26T11:00:00+01:00 | 2023-03-26T11:30:00+01:00 |
0.364 | 2023-03-26T11:30:00+01:00 | 2023-03-26T12:00:00+01:00 |
0.624 | 2023-03-26T12:00:00+01:00 | 2023-03-26T12:30:00+01:00 |
0.194 | 2023-03-26T12:30:00+01:00 | 2023-03-26T13:00:00+01:00 |
0.418 | 2023-03-26T13:00:00+01:00 | 2023-03-26T13:30:00+01:00 |
0.599 | 2023-03-26T13:30:00+01:00 | 2023-03-26T14:00:00+01:00 |
1.143 | 2023-03-26T14:00:00+01:00 | 2023-03-26T14:30:00+01:00 |
0.738 | 2023-03-26T14:30:00+01:00 | 2023-03-26T15:00:00+01:00 |
0.567 | 2023-03-26T15:00:00+01:00 | 2023-03-26T15:30:00+01:00 |
0.399 | 2023-03-26T15:30:00+01:00 | 2023-03-26T16:00:00+01:00 |
0.361 | 2023-03-26T16:00:00+01:00 | 2023-03-26T16:30:00+01:00 |
0.451 | 2023-03-26T16:30:00+01:00 | 2023-03-26T17:00:00+01:00 |
0.359 | 2023-03-26T17:00:00+01:00 | 2023-03-26T17:30:00+01:00 |
0.384 | 2023-03-26T17:30:00+01:00 | 2023-03-26T18:00:00+01:00 |
0.415 | 2023-03-26T18:00:00+01:00 | 2023-03-26T18:30:00+01:00 |
0.932 | 2023-03-26T18:30:00+01:00 | 2023-03-26T19:00:00+01:00 |
0.438 | 2023-03-26T19:00:00+01:00 | 2023-03-26T19:30:00+01:00 |
0.435 | 2023-03-26T19:30:00+01:00 | 2023-03-26T20:00:00+01:00 |
0.405 | 2023-03-26T20:00:00+01:00 | 2023-03-26T20:30:00+01:00 |
0.429 | 2023-03-26T20:30:00+01:00 | 2023-03-26T21:00:00+01:00 |
0.404 | 2023-03-26T21:00:00+01:00 | 2023-03-26T21:30:00+01:00 |
0.415 | 2023-03-26T21:30:00+01:00 | 2023-03-26T22:00:00+01:00 |
0.357 | 2023-03-26T22:00:00+01:00 | 2023-03-26T22:30:00+01:00 |
0.382 | 2023-03-26T22:30:00+01:00 | 2023-03-26T23:00:00+01:00 |
0.378 | 2023-03-26T23:00:00+01:00 | 2023-03-26T23:30:00+01:00 |
0.366 | 2023-03-26T23:30:00+01:00 | 2023-03-27T00:00:00+01:00 |
0.331 | 2023-03-27T00:00:00+01:00 | 2023-03-27T00:30:00+01:00 |
0.333 | 2023-03-27T00:30:00+01:00 | 2023-03-27T01:00:00+01:00 |
0.339 | 2023-03-27T01:00:00+01:00 | 2023-03-27T01:30:00+01:00 |
0.318 | 2023-03-27T01:30:00+01:00 | 2023-03-27T02:00:00+01:00 |
0.349 | 2023-03-27T02:00:00+01:00 | 2023-03-27T02:30:00+01:00 |
0.32 | 2023-03-27T02:30:00+01:00 | 2023-03-27T03:00:00+01:00 |
0.349 | 2023-03-27T03:00:00+01:00 | 2023-03-27T03:30:00+01:00 |
0.324 | 2023-03-27T03:30:00+01:00 | 2023-03-27T04:00:00+01:00 |
0.336 | 2023-03-27T04:00:00+01:00 | 2023-03-27T04:30:00+01:00 |
0.336 | 2023-03-27T04:30:00+01:00 | 2023-03-27T05:00:00+01:00 |
0.32 | 2023-03-27T05:00:00+01:00 | 2023-03-27T05:30:00+01:00 |
0.496 | 2023-03-27T05:30:00+01:00 | 2023-03-27T06:00:00+01:00 |
0.37 | 2023-03-27T06:00:00+01:00 | 2023-03-27T06:30:00+01:00 |
0.383 | 2023-03-27T06:30:00+01:00 | 2023-03-27T07:00:00+01:00 |
0.314 | 2023-03-27T07:00:00+01:00 | 2023-03-27T07:30:00+01:00 |
The pricing file for Agile follows this format:
Interval_From | Time | Price_Index | Region | Cost |
2023/03/25 11:00 | 11:00:00 | B | East_Midlands | 18.186 |
2023/03/25 11:30 | 11:30:00 | B | East_Midlands | 19.845 |
2023/03/25 12:00 | 12:00:00 | B | East_Midlands | 24.549 |
2023/03/25 12:30 | 12:30:00 | B | East_Midlands | 19.866 |
2023/03/25 13:00 | 13:00:00 | B | East_Midlands | 21.63 |
2023/03/25 13:30 | 13:30:00 | B | East_Midlands | 21.63 |
2023/03/25 14:00 | 14:00:00 | B | East_Midlands | 22.89 |
2023/03/25 14:30 | 14:30:00 | B | East_Midlands | 21.441 |
2023/03/25 15:00 | 15:00:00 | B | East_Midlands | 18.354 |
2023/03/25 15:30 | 15:30:00 | B | East_Midlands | 20.391 |
2023/03/25 16:00 | 16:00:00 | B | East_Midlands | 33.0182 |
2023/03/25 16:30 | 16:30:00 | B | East_Midlands | 33.0182 |
2023/03/25 17:00 | 17:00:00 | B | East_Midlands | 33.0182 |
2023/03/25 17:30 | 17:30:00 | B | East_Midlands | 33.0182 |
2023/03/25 18:00 | 18:00:00 | B | East_Midlands | 33.0182 |
2023/03/25 18:30 | 18:30:00 | B | East_Midlands | 33.0182 |
2023/03/25 19:00 | 19:00:00 | B | East_Midlands | 32.55 |
2023/03/25 19:30 | 19:30:00 | B | East_Midlands | 28.644 |
2023/03/25 20:00 | 20:00:00 | B | East_Midlands | 29.904 |
2023/03/25 20:30 | 20:30:00 | B | East_Midlands | 22.554 |
2023/03/25 21:00 | 21:00:00 | B | East_Midlands | 24.003 |
2023/03/25 21:30 | 21:30:00 | B | East_Midlands | 21.189 |
2023/03/25 22:00 | 22:00:00 | B | East_Midlands | 23.667 |
2023/03/25 22:30 | 22:30:00 | B | East_Midlands | 20.013 |
2023/03/25 23:00 | 23:00:00 | B | East_Midlands | 24.192 |
2023/03/25 23:30 | 23:30:00 | B | East_Midlands | 25.788 |
2023/03/26 00:00 | 00:00:00 | B | East_Midlands | 25.515 |
2023/03/26 00:30 | 00:30:00 | B | East_Midlands | 27.3 |
2023/03/26 02:00 | 02:00:00 | B | East_Midlands | 24.57 |
2023/03/26 02:30 | 02:30:00 | B | East_Midlands | 23.73 |
2023/03/26 03:00 | 03:00:00 | B | East_Midlands | 24.15 |
2023/03/26 03:30 | 03:30:00 | B | East_Midlands | 22.05 |
2023/03/26 04:00 | 04:00:00 | B | East_Midlands | 20.391 |
2023/03/26 04:30 | 04:30:00 | B | East_Midlands | 16.359 |
2023/03/26 05:00 | 05:00:00 | B | East_Midlands | 15.897 |
2023/03/26 05:30 | 05:30:00 | B | East_Midlands | 14.28 |
2023/03/26 06:00 | 06:00:00 | B | East_Midlands | 14.637 |
2023/03/26 06:30 | 06:30:00 | B | East_Midlands | 16.569 |
2023/03/26 07:00 | 07:00:00 | B | East_Midlands | 12.81 |
2023/03/26 07:30 | 07:30:00 | B | East_Midlands | 18.186 |
2023/03/26 08:00 | 08:00:00 | B | East_Midlands | 14.7 |
2023/03/26 08:30 | 08:30:00 | B | East_Midlands | 20.496 |
2023/03/26 09:00 | 09:00:00 | B | East_Midlands | 22.239 |
2023/03/26 09:30 | 09:30:00 | B | East_Midlands | 22.281 |
2023/03/26 10:00 | 10:00:00 | B | East_Midlands | 23.52 |
2023/03/26 10:30 | 10:30:00 | B | East_Midlands | 27.699 |
2023/03/26 11:00 | 11:00:00 | B | East_Midlands | 24.36 |
2023/03/26 11:30 | 11:30:00 | B | East_Midlands | 24.444 |
2023/03/26 12:00 | 12:00:00 | B | East_Midlands | 25.2 |
2023/03/26 12:30 | 12:30:00 | B | East_Midlands | 25.2 |
2023/03/26 13:00 | 13:00:00 | B | East_Midlands | 22.848 |
2023/03/26 13:30 | 13:30:00 | B | East_Midlands | 22.47 |
2023/03/26 14:00 | 14:00:00 | B | East_Midlands | 19.95 |
2023/03/26 14:30 | 14:30:00 | B | East_Midlands | 19.95 |
2023/03/26 15:00 | 15:00:00 | B | East_Midlands | 19.278 |
2023/03/26 15:30 | 15:30:00 | B | East_Midlands | 20.37 |
2023/03/26 16:00 | 16:00:00 | B | East_Midlands | 32.55 |
2023/03/26 16:30 | 16:30:00 | B | East_Midlands | 33.0182 |
2023/03/26 17:00 | 17:00:00 | B | East_Midlands | 33.0182 |
2023/03/26 17:30 | 17:30:00 | B | East_Midlands | 33.0182 |
2023/03/26 18:00 | 18:00:00 | B | East_Midlands | 33.0182 |
2023/03/26 18:30 | 18:30:00 | B | East_Midlands | 33.0182 |
2023/03/26 19:00 | 19:00:00 | B | East_Midlands | 29.652 |
2023/03/26 19:30 | 19:30:00 | B | East_Midlands | 29.568 |
2023/03/26 20:00 | 20:00:00 | B | East_Midlands | 32.928 |
2023/03/26 20:30 | 20:30:00 | B | East_Midlands | 27.195 |
2023/03/26 21:00 | 21:00:00 | B | East_Midlands | 29.232 |
2023/03/26 21:30 | 21:30:00 | B | East_Midlands | 17.472 |
2023/03/26 22:00 | 22:00:00 | B | East_Midlands | 17.43 |
2023/03/26 22:30 | 22:30:00 | B | East_Midlands | 16.38 |
2023/03/26 23:00 | 23:00:00 | B | East_Midlands | 24.255 |
2023/03/26 23:30 | 23:30:00 | B | East_Midlands | 23.184 |
2023/03/27 00:00 | 00:00:00 | B | East_Midlands | 21 |
2023/03/27 00:30 | 00:30:00 | B | East_Midlands | 19.929 |
2023/03/27 01:00 | 01:00:00 | B | East_Midlands | 21.819 |
2023/03/27 01:30 | 01:30:00 | B | East_Midlands | 21.777 |
2023/03/27 02:00 | 02:00:00 | B | East_Midlands | 22.47 |
2023/03/27 02:30 | 02:30:00 | B | East_Midlands | 21 |
2023/03/27 03:00 | 03:00:00 | B | East_Midlands | 20.979 |
2023/03/27 03:30 | 03:30:00 | B | East_Midlands | 19.95 |
2023/03/27 04:00 | 04:00:00 | B | East_Midlands | 21 |
2023/03/27 04:30 | 04:30:00 | B | East_Midlands | 21 |
2023/03/27 05:00 | 05:00:00 | B | East_Midlands | 26.565 |
2023/03/27 05:30 | 05:30:00 | B | East_Midlands | 24.192 |
2023/03/27 06:00 | 06:00:00 | B | East_Midlands | 26.46 |
2023/03/27 06:30 | 06:30:00 | B | East_Midlands | 24.255 |
2023/03/27 07:00 | 07:00:00 | B | East_Midlands | 24.255 |
2023/03/27 07:30 | 07:30:00 | B | East_Midlands | 32.886 |
2023/03/27 08:00 | 08:00:00 | B | East_Midlands | 29.232 |
2023/03/27 08:30 | 08:30:00 | B | East_Midlands | 29.232 |
2023/03/27 09:00 | 09:00:00 | B | East_Midlands | 28.896 |
2023/03/27 09:30 | 09:30:00 | B | East_Midlands | 27.321 |
2023/03/27 10:00 | 10:00:00 | B | East_Midlands | 25.2 |
2023/03/27 10:30 | 10:30:00 | B | East_Midlands | 22.239 |
2023/03/27 11:00 | 11:00:00 | B | East_Midlands | 22.344 |
2023/03/27 11:30 | 11:30:00 | B | East_Midlands | 24.423 |
2023/03/27 12:00 | 12:00:00 | B | East_Midlands | 24.15 |
2023/03/27 12:30 | 12:30:00 | B | East_Midlands | 23.436 |
2023/03/27 13:00 | 13:00:00 | B | East_Midlands | 22.47 |
2023/03/27 13:30 | 13:30:00 | B | East_Midlands | 21.441 |
2023/03/27 14:00 | 14:00:00 | B | East_Midlands | 22.008 |
2023/03/27 14:30 | 14:30:00 | B | East_Midlands | 20.118 |
2023/03/27 15:00 | 15:00:00 | B | East_Midlands | 19.11 |
2023/03/27 15:30 | 15:30:00 | B | East_Midlands | 19.11 |
2023/03/27 16:00 | 16:00:00 | B | East_Midlands | 33.0182 |
2023/03/27 16:30 | 16:30:00 | B | East_Midlands | 33.0182 |
2023/03/27 17:00 | 17:00:00 | B | East_Midlands | 33.0182 |
2023/03/27 17:30 | 17:30:00 | B | East_Midlands | 33.0182 |
2023/03/27 18:00 | 18:00:00 | B | East_Midlands | 33.0182 |
2023/03/27 18:30 | 18:30:00 | B | East_Midlands | 33.0182 |
2023/03/27 19:00 | 19:00:00 | B | East_Midlands | 33.0182 |
2023/03/27 19:30 | 19:30:00 | B | East_Midlands | 33.0182 |
2023/03/27 20:00 | 20:00:00 | B | East_Midlands | 33.0182 |
2023/03/27 20:30 | 20:30:00 | B | East_Midlands | 29.904 |
2023/03/27 21:00 | 21:00:00 | B | East_Midlands | 29.568 |
2023/03/27 21:30 | 21:30:00 | B | East_Midlands | 21.042 |
2023/03/27 22:00 | 22:00:00 | B | East_Midlands | 24.255 |
2023/03/27 22:30 | 22:30:00 | B | East_Midlands | 20.37 |
2023/03/27 23:00 | 23:00:00 | B | East_Midlands | 25.2 |
2023/03/27 23:30 | 23:30:00 | B | East_Midlands | 23.94 |
2023/03/28 00:00 | 00:00:00 | B | East_Midlands | 27.552 |
2023/03/28 00:30 | 00:30:00 | B | East_Midlands | 25.557 |
2023/03/28 01:00 | 01:00:00 | B | East_Midlands | 22.05 |
2023/03/28 01:30 | 01:30:00 | B | East_Midlands | 25.83 |
2023/03/28 02:00 | 02:00:00 | B | East_Midlands | 23.31 |
2023/03/28 02:30 | 02:30:00 | B | East_Midlands | 18.9 |
2023/03/28 03:00 | 03:00:00 | B | East_Midlands | 20.7795 |
2023/03/28 03:30 | 03:30:00 | B | East_Midlands | 17.43 |
2023/03/28 04:00 | 04:00:00 | B | East_Midlands | 20.832 |
2023/03/28 04:30 | 04:30:00 | B | East_Midlands | 19.299 |
2023/03/28 05:00 | 05:00:00 | B | East_Midlands | 23.268 |
2023/03/28 05:30 | 05:30:00 | B | East_Midlands | 23.1 |
2023/03/28 06:00 | 06:00:00 | B | East_Midlands | 27.3 |
2023/03/28 06:30 | 06:30:00 | B | East_Midlands | 30.576 |
2023/03/28 07:00 | 07:00:00 | B | East_Midlands | 27.09 |
2023/03/28 07:30 | 07:30:00 | B | East_Midlands | 33.0182 |
2023/03/28 08:00 | 08:00:00 | B | East_Midlands | 27.3 |
and the tracker following this format:
Interval_From | Time | Price_Index | Region | Cost |
01/03/2023 00:00 | 00:00:00 | B | East_Midlands | 24.13 |
02/03/2023 00:00 | 00:00:00 | B | East_Midlands | 24.61 |
03/03/2023 00:00 | 00:00:00 | B | East_Midlands | 25.03 |
04/03/2023 00:00 | 00:00:00 | B | East_Midlands | 23.58 |
05/03/2023 00:00 | 00:00:00 | B | East_Midlands | 23.99 |
06/03/2023 00:00 | 00:00:00 | B | East_Midlands | 24.56 |
07/03/2023 00:00 | 00:00:00 | B | East_Midlands | 24.43 |
08/03/2023 00:00 | 00:00:00 | B | East_Midlands | 23.95 |
09/03/2023 00:00 | 00:00:00 | B | East_Midlands | 23.1 |
10/03/2023 00:00 | 00:00:00 | B | East_Midlands | 21.98 |
11/03/2023 00:00 | 00:00:00 | B | East_Midlands | 23.5 |
12/03/2023 00:00 | 00:00:00 | B | East_Midlands | 21.59 |
13/03/2023 00:00 | 00:00:00 | B | East_Midlands | 19.61 |
14/03/2023 00:00 | 00:00:00 | B | East_Midlands | 21.9 |
15/03/2023 00:00 | 00:00:00 | B | East_Midlands | 24.56 |
16/03/2023 00:00 | 00:00:00 | B | East_Midlands | 22.1 |
17/03/2023 00:00 | 00:00:00 | B | East_Midlands | 21.71 |
18/03/2023 00:00 | 00:00:00 | B | East_Midlands | 21.82 |
19/03/2023 00:00 | 00:00:00 | B | East_Midlands | 21.69 |
20/03/2023 00:00 | 00:00:00 | B | East_Midlands | 21.11 |
21/03/2023 00:00 | 00:00:00 | B | East_Midlands | 20.09 |
22/03/2023 00:00 | 00:00:00 | B | East_Midlands | 17.34 |
23/03/2023 00:00 | 00:00:00 | B | East_Midlands | 18.39 |
24/03/2023 00:00 | 00:00:00 | B | East_Midlands | 18.51 |
25/03/2023 00:00 | 00:00:00 | B | East_Midlands | 18.15 |
26/03/2023 00:00 | 00:00:00 | B | East_Midlands | 20.71 |
27/03/2023 01:00 | 00:00:00 | B | East_Midlands | 21.43 |
28/03/2023 01:00 | 00:00:00 | B | East_Midlands | 21.51 |
29/03/2023 01:00 | 00:00:00 | B | East_Midlands | 20.82 |
30/03/2023 01:00 | 00:00:00 | B | East_Midlands | 20.56 |
31/03/2023 01:00 | 00:00:00 | B | East_Midlands | 21.15 |
For reference, the data are all collated from an API feed. The region and sheetname are currently taken from an indirect on Sheet "Config" and in cells C2 and C3 respectively
Octopus Consumption Comparison.xlsx | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | |||
1 | AgileCode | Region | |||||||||||||
2 | Pricing | B | A | Eastern_England | |||||||||||
3 | Filename | East_Midlands | B | East_Midlands | |||||||||||
4 | C | London | |||||||||||||
5 | D | Merseyside_and_Northern_Wales | |||||||||||||
6 | E | West_Midlands | |||||||||||||
7 | F | North_Eastern_England | |||||||||||||
8 | G | North_Western_England | |||||||||||||
9 | H | Southern_England | |||||||||||||
10 | J | South_Eastern_England | |||||||||||||
11 | K | Southern_Wales | |||||||||||||
12 | L | South_Western_England | |||||||||||||
13 | M | Yorkshire | |||||||||||||
14 | N | Southern_Scotland | |||||||||||||
15 | P | Northern_Scotland | |||||||||||||
16 | |||||||||||||||
Config |
Cell Formulas | ||
---|---|---|
Range | Formula | |
C3 | C3 | =INDEX(M2:M15,MATCH(C2,L2:L15,0)) |
I wish to apply the correct pricing within the consumption sheet, for example
Agile:
Code:
=VLOOKUP(VALUE(LEFT(B2, 10) & " " & IF(RIGHT(B2,1)="Z",VALUE(MID($B2,12,2)),VALUE(MID(B4,12,2))) &":" & MID(B2, 15, 5)), INDIRECT("csv_agile_" & Config!$C$2 & "_" & Config!$C$3 & "!A:E"), 5, FALSE)
However, on the last 2 rows, this obviously has nothing to index against, but otherwise it works well.
Any idea's on how I can alter this to incorporate the interval_from change without using a row offset of 2? as that obviously fails on the last two 30 minute segments
And for tracker pricing, I don't know how to capture the change in the higlighted sections,
I have tried offsets against the interval date, but they break, because I was using
Code:
=if(right(b1)="Z" ............
Example of the formula I was trying to get to work but it has defeated me
Code:
=VLOOKUP(VALUE(LEFT(B2, 10) & " " & IF(RIGHT(B2,1)="Z","00:00:00","01:00:00")), INDIRECT("csv_tracker_" & Config!$C$2 & "_" & Config!$C$3 & "!A:%"), 5, FALSE)
This works, until the changeover as depicted below: