Forum Discussion
Pivot Table Grouping
I would transform the data a bit in Power Query.
For the solar production data, create separate columns for the Date and the Time. Then, from the Time column, extract only the Hour portion based a 24-hour clock. For the time period 1pm to 1:59pm that would be 13. Do something similar for the Usage table though now with 4 entries per hour.
Append the two tables (also in Power Query), load back to Excel or the Data Model and create a pivot table with date and hour in the Row, Type (Production/Usage) in the Column and kWh (I presume) in the value field as a Sum.
The pivot table will automatically sum the four (15-minute) rows per hour from Usage into one number for the entire hour. No need for complicated calculated fields.
If you could upload or share a file (Onedrive, Dropbox or similar) with the production and usage data, I or someone else could more easily demonstrate how that would work.