Forum Discussion

RonRichmond's avatar
RonRichmond
Copper Contributor
May 04, 2020
Solved

Summing consumption for night hours only

Hi, I have daily solar production/consumption report in 15 minute increments. I would like to subtract the daytime consumption figures so that I can work out what the nightly consumption is. The Dat...
  • Riny_van_Eekelen's avatar
    May 04, 2020

    RonRichmond Please see the attached workbook. I left your data as it was but added some columns towards the right to demonstrate a solution. First you need to separate the Date, Time and Time zone and make sure that the dates are real dates (not texts looking like dates) and that the time entries are formatted as Time. I used "Text-to-columns" in the Data ribbon.  Then you can use the dates to calculate week-numbers and the times to see which fall in the day bracket. Use SUMIF to summarise by week and day or night as shown from row 675 and down.

     

    Now, if this something that you want to update very frequently, you may want to look into a more automated solution using Get&Transform (a.k.a. Power Query, found also on the Data ribbon, Windows365). You record all the steps as explained above and make a summary once and save it. You can then use it over and over again. Not too difficult but you have to learn a few more tricks and it requires some getting used to, if you have never used it before.