[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to graph monthly totals of gym visits from data/times of visits

Posted on 2012-12-28
6
Medium Priority
?
261 Views
Last Modified: 2012-12-30
I have data showing the dates and times I have visited various gyms to workout. The data are in the form

Date, Time, Gym name

I want to make a bar graph with months on the x axis and visits per month on the y axis. I also want to make a pie chart showing the number of visits during one hour periods of the day. Example: 5:00 am to 5:59 am, 6:00 am to 6:59 am and so on. I also want to make a pie chart showing the number of times I visited each location. I've mocked up what this might look like by using some fake data. That Excel file is called Example.xlsx. The actual data file is called Gym visits.xlsx. I've changed the gym names to colors for privacy.

I would like someone to actually make the finished product but to also explain what was done so I can learn more about Excel.

Thanks,
donander
Example.xlsx
Gym-Visits.xlsx
0
Comment
Question by:donander
  • 3
  • 3
6 Comments
 
LVL 50
ID: 38728579
Hello,

the easiest way to analyse this data is to use pivot charts. Attached please find three charts with pivot tables as the underlying data. Since the hours chart had so many slices, I changed it to a horizontal bar chart, which is much easier to read than a pie chart. Also, I've applied a filter to show only years 2011 and 2012 in the top chart. You can click on the filter buttons in the chart to change the filters.

To get started with Pivot Tables, take a look at

http://peltiertech.com/Excel/Pivots/pivotstart.htm

If the data source changes, i.e. if you add more rows of data to the sheet, you may want to make the source for the pivot tables dynamic. How to do that is described here:

http://www.contextures.com/xlPivot01.html


cheers, teylyn
0
 

Author Comment

by:donander
ID: 38728601
Sorry, I don't see the attached files. Am I missing something?

Thanks,
donander
0
 
LVL 50

Accepted Solution

by:
Ingeborg Hawighorst (Microsoft MVP / EE MVE) earned 2000 total points
ID: 38728604
Ooops .... Here it is.
Gym-Visits.xlsx
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:donander
ID: 38728629
Well, this is simply fantastic. You've made exactly what I was looking for and you did it in less than an hour! I will also check out the links you provided to learn how to do this myself.

I do have a couple of questions. If I want to now change the colors back to the gym names in the original data, do I need to make the source dynamic so the chart legends will reflect this? I will want to add more data so I'll have to make the source dynamic for that in any case.

I noticed that in the Count of Gym time chart (the top one) if I display all the years there are some months that do not show up on the x axis. I realize this is because there were 0 (zero) visits in those months. But I would like those months to show up because I want to have the visual impact of those months where I did not visit the gym at all. Is that possible?

Thanks!
Donander
0
 
LVL 50
ID: 38728650
LOL, actually, I did it in under ten minutes. That's how powerful pivot tables are!

If you replace the real gym names in the source data and then refresh the pivot table, that should do the trick for the names.

For every month you did not visit the gym, enter one row of data with a date from that month. Leave the other two columns empty. Then make sure to use the count of visits on either the time or the gym name, which will then be zero for that month.

The easiest way to make the data source dynamic is to turn it into an Excel Table: select any cell in the source data and then click Insert > Table. By default, Excel will call the table "Table1". Every new row of data you enter will automatically expand the table, if you enter new data in the next empty row.  Then change the pivot sources to be "Table1" and refresh the pivot tables after adding new data.

Cheers, teylyn
0
 

Author Closing Comment

by:donander
ID: 38730981
teylyn provided a solution to my question on the first try and it was excellent! If I could give more than 500 points I would do so for this answer. teylyn is truly an expert.

Thanks,
donander
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

830 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