Solved

Number of events by day and hour

Posted on 2010-11-11
8
418 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

786 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