Solved

Number of events by day and hour

Posted on 2010-11-11
8
415 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

867 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now