Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Aggregate hourly bytes to daily

I have data stream that collects data usage per user.  The data is in hourly and have been collecting this data regulary.  How to I go about so that I can display the aggregate data per day instead of hourly without creating new column since we also need the same data for the line chart.

 

time_stampUserBytes
6/5/2019 0:00Steve374880968.8
6/5/2019 1:00Steve332580500
6/5/2019 2:00Steve302910031.3
6/5/2019 3:00Steve346099281.3
6/5/2019 4:00Steve315223437.5
6/5/2019 5:00Steve339442937.5
6/5/2019 6:00Steve333164312.5
6/5/2019 7:00Steve391347125
6/5/2019 8:00Steve432070781.3
6/5/2019 9:00Steve476643562.5
6/5/2019 10:00Steve434617062.5
6/5/2019 11:00Steve417475968.8
6/5/2019 12:00Steve470397437.5
6/5/2019 13:00Steve507142406.3
6/5/2019 14:00Steve679750750
6/5/2019 15:00Steve528020031.3
6/5/2019 16:00Steve426049312.5
6/5/2019 17:00Steve427328593.8
6/5/2019 18:00Steve362404625
6/5/2019 19:00Steve329924593.8
6/5/2019 20:00Steve362511375
6/5/2019 21:00Steve395737125
6/5/2019 22:00Steve365116406.3
6/5/2019 23:00Steve324718562.5
6/6/2019 0:00Steve338591718.8
6/6/2019 1:00Steve320378500
6/6/2019 2:00Steve296023562.5
6/6/2019 3:00Steve367451000
6/6/2019 4:00Steve380653093.8
6/6/2019 5:00Steve392283656.3
6/6/2019 6:00Steve457481281.3
6/6/2019 7:00Steve432150937.5
6/6/2019 8:00Steve497446781.3
6/6/2019 9:00Steve449558437.5
6/6/2019 10:00Steve494554062.5
6/6/2019 11:00Steve463344406.3
6/6/2019 12:00Steve493005031.3
6/6/2019 13:00Steve471070468.8
6/6/2019 14:00Steve425981750
6/6/2019 15:00Steve451298218.8
6/6/2019 16:00Steve343354593.8
6/6/2019 17:00Steve413200187.5
6/6/2019 18:00Steve342956687.5
6/6/2019 19:00Steve344050281.3
6/6/2019 20:00Steve368797812.5
6/6/2019 21:00Steve296131250
6/6/2019 22:00Steve327823218.8
6/6/2019 23:00Steve275181062.5
6/7/2019 0:00Steve330895843.8
6/7/2019 1:00Steve285541750
6/7/2019 2:00Steve240747750
6/7/2019 3:00Steve308361000
6/7/2019 4:00Steve324009937.5
6/7/2019 5:00Steve341597750
6/7/2019 6:00Steve424309218.8
6/7/2019 7:00Steve427691875
6/7/2019 8:00Steve493539562.5
6/7/2019 9:00Steve439180937.5
6/7/2019 10:00Steve393510125
6/7/2019 11:00Steve402607906.3
6/7/2019 12:00Steve519442218.8
6/7/2019 13:00Steve494229531.3
6/7/2019 14:00Steve498988937.5
6/7/2019 15:00Steve502675281.3
6/7/2019 16:00Steve501857625
6/7/2019 17:00Steve376268562.5
6/7/2019 18:00Steve373258781.3
6/7/2019 19:00Steve326514281.3
6/7/2019 20:00Steve401723875
6/7/2019 21:00Steve366760656.3
6/7/2019 22:00Steve311002843.8
6/7/2019 23:00Steve256467843.8
6/8/2019 0:00Steve280781562.5
  • Hi Anonymous ,

     

    On my experience working with dates and times, and looking back at what I have read about dates used in models for Power BI and other BI programs, there are some pieces of information that you need to create on your model to have the full details that you need.

     

    In the case of dates, you need to have Day, month, year for sure depending on the need you have you may also need to have a quarter, week, weekday, month name, etc. Although you may think this some times can be redundant information, in the long run, it will help to give insights to your model when you want to start to drill down or up.

     

    On your question, I believe that you should create a date column, but I go even further and say that maybe you should consider a calendar dimension table to make your time calculations. This is only my opinion.

     

    Looking at your data the possible way to not create new columns is to activate the Auto Date/time option on the options of your PBIX file and use the hierarchy (Year / Month / Day) on your chart/visuals and drill down to the last level and you will get the day level instead of the hour.

     

     

    On the image to the left you have the hourly data on the right the daily data.

     

    Regards,

    MFelix

1 Reply

  • Hi Anonymous ,

     

    On my experience working with dates and times, and looking back at what I have read about dates used in models for Power BI and other BI programs, there are some pieces of information that you need to create on your model to have the full details that you need.

     

    In the case of dates, you need to have Day, month, year for sure depending on the need you have you may also need to have a quarter, week, weekday, month name, etc. Although you may think this some times can be redundant information, in the long run, it will help to give insights to your model when you want to start to drill down or up.

     

    On your question, I believe that you should create a date column, but I go even further and say that maybe you should consider a calendar dimension table to make your time calculations. This is only my opinion.

     

    Looking at your data the possible way to not create new columns is to activate the Auto Date/time option on the options of your PBIX file and use the hierarchy (Year / Month / Day) on your chart/visuals and drill down to the last level and you will get the day level instead of the hour.

     

     

    On the image to the left you have the hourly data on the right the daily data.

     

    Regards,

    MFelix