Solved

Number of events by day and hour

Posted on 2010-11-11
8
419 Views
Last Modified: 2013-11-05
Hi all,

I would like to set up a graph with number of events by hour and by day.
I don't know how set up data on the spredsheet to do it easily.

Formula and or VBA welcome.
If you have some ideas to present such data, it's welcome too.
I also wanted to establish a chronological curve with dates and times that would allow me to see if the same pattern is replicated every day, but don't know to do it ...
excelgraphexpected.JPG
0
Comment
Question by:Tasmant
8 Comments
 
LVL 37

Accepted Solution

by:
TommySzalapski earned 167 total points
ID: 34115272
I would do it in line charts like in my example spreadsheet. (My graph looks random because my data was, in fact, random)
Events-per-hour-chart.xlsx
0
 
LVL 50

Assisted Solution

by:Ingeborg Hawighorst
Ingeborg Hawighorst earned 167 total points
ID: 34115324
Hello,

see attached for a suggestion.

I've created some dummy data for a few days and times, then built three pivot charts.

One pivot chart (on sheet Chart1) totals all events by day, the other pivot chart (on Chart2) groups by hour. You can select an individual day from the dropdown in the chart, or select all days (or just some days)

The third pivot chart (Chart 3) totals all times into their hour slot, regardless of which day, so you see which hours have the most events in total.

Does that give you a starting point?

cheers, teylyn
Book1.xls
0
 
LVL 13

Assisted Solution

by:gbanik
gbanik earned 166 total points
ID: 34115643
Check this file.... tell me if you like it.

Fill in the yellow cell with values from 0 to 1 corresponding to 0 to 24 hrs... example, for blocks of 12 hours each type 0.5

Sorry could not post any code... cos there is nothing much. Keep the macros on!

(But I am happy with the output.)
TimeChart.xlsm
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 13

Expert Comment

by:gbanik
ID: 34115681
Do tell me if the above is a good direction...
only one line of macro in the code to reset the chart.

BTW, the line could also be
Target.Worksheet.ChartObjects("PeriodChart").Chart.SetSourceData Source:=Range("Period", "Values")
0
 
LVL 13

Expert Comment

by:gbanik
ID: 34115791
An interesting thing I learned today is:
You can have a dynamic range over formulas (not just values) like this
=OFFSET(Sheet1!$F$1,,,COUNTIFS(Sheet1!$F:$F,"<>",Sheet1!$F:$F,">0"),1)
provided F contains numbers.
0
 
LVL 50

Expert Comment

by:Ingeborg Hawighorst
ID: 34115906
@Gbanik,

You don't need a macro to make a chart dynamic. You can plug the dynamic range names straight into the series formula.

=SERIES(Sheet1!$G$1,TimeChart.xlsm!Period,TimeChart.xlsm!Values,1)

Also, an alternative for defining the dynamic range is

=Sheet1!$F$2:INDEX(Sheet1!$F:$F,COUNT(Sheet1!$F:$F)+1)

cheers, teylyn
0
 
LVL 13

Expert Comment

by:gbanik
ID: 34115955
teylyn thx again :)  .... new learning everyday :)
(but alas... and forgetting a few good ones too!)
0
 
LVL 11

Author Closing Comment

by:Tasmant
ID: 34119279
Thanks guys you're really amazing.
I split points as each solution is very interesting, but for me each of you should have 1000 points !
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question