Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2012-12-28
6
Medium Priority
?
260 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
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…

610 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