+ Reply to Thread
Results 1 to 5 of 5

Tracking time by Activity over a week period using Pivots

  1. #1
    Registered User
    Join Date
    09-08-2016
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    3

    Smile Tracking time by Activity over a week period using Pivots

    Hi, I'm very new here, and haven’t got too much experience with excel so my question is likely very basic level, but I’m sick of unsuccessful googling so have come here in hopes of finding some help.

    Basically what I want to do is track my time in 5 minute increments over a weekly period, then create pie charts by day and week to visually see how I’ve spent my time. I have a spreadsheet with days as columns and times as rows, and as the time passes I fill it in with the activity I was doing (see example).

    Sample Table.png

    I want to be able to turn this data into a pivot so that I don’t need to do anything manually to count the activities over the week. The next table I created using the ‘count if’ function, which worked but was time consuming (to add each individual activity which over a week there’ll be a lot of), and I’m sure a pivot could do this for me. So essentially, I’d like to know if I can make this exact table through the pivots function, with the activities list on the left being automatically added to when I add a new activity in the spreadsheet. (note that each number in the chart below indicates a 5 minute period)

    Ideal Table.png

    I'm hoping I'll be able to create daily and weekly pie charts from the same pivot, but will cross that bridge when I come to it - need to get an actual useful working pivot first

    Sorry if this is a ridiculously basic question, I appreciate any help I can get
    I've attached the spreadsheet which the above two screenshots are from too if that's helpful
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Tracking time by Activity over a week period using Pivots

    I think you did the best you can do given the way the data is organized. To get a more flexible result, you'll have to normalize the data as shown in the table on the Normalized Data Sheet. A pivot table can do a lot with data formatted this way.

    The table off to the side is for the purposes of data validation. Since I am using Excel tables, the validation carries down automatically each time a row is added. Since the lookup for the validation is also in a table, when you add an activity to the orange table, it's available on the dropdown.

    It's not as bad as it looks. This is nothing more than your original schedule except the days are strung down vertically instead of side-by-side.

    As it stands, the pivot table counts the number of 5 minute periods devoted to the activities each day. If you want actual time, I suggest a helper column with the formula =5/1440 - there are 1440 minutes in a day so 5/1440 is a five minute time period. I show that as the second pivot table on the Pivot Table Sheet.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    09-08-2016
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    3

    Re: Tracking time by Activity over a week period using Pivots

    Thanks dflak,

    Your solution is essentially perfect for what I want to do and I'm assuming using excel tables will also give me many more ways to interpret my data should I choose to - so thank you!
    I do have just a couple more questions, firstly I'd prefer to have the days listed side by side (so I can visually compare what I was doing at each time each day), I know you mentioned this as an issue and I also had a play around and it doesn't look like that's possible without making the pivot table go crazy with levels (is that what they're called?). So I figure the best option is to just make 7 separate pivot tables linked to each individual data table per day, but my question is is there a way to 'sum' pivot tables? or a way to extract just the totals from each pivot and sum them in a new table without the manual copy paste? All I need in regard to the totals is simply 2 columns, one with the activity name and the other with how frequently they occurred (this is just to make a pie chart for how the week's time was spent).

    Essentially, I'd love to have it be that the only thing I need to do is plug in the activity at the time I do it and have everything else happen automatically, from the pivots to the graph (this might be dreaming but I know excel is a powerful tool so fingers crossed). I do know I can do this per day, as making pie charts linked to pivots is easy and automatically updates, it's just a question of whether or not I can get weekly totals by activity without having to enter all the data in one table.

    EDIT: I've figured out how to do the below, I've just added an extra column into the table called 'category' and then tweak the pivot table as needed
    Second question is pretty far fetched but thought I'd ask just in case it was possible. Is there a way to make excel recognise and count 'categories' rather than the whole text? For example, say I wanted to use 'Food' as a category with 'cooking' 'eating' etc as sub categories, is there a way to enter this into the table so that excel just picks up the 'food' component and groups all the activities containing food together in the pivot? eg listing 'Food: cooking', 'Food: eating' would make all activity entries with either those names appear in the pivot table under just one category of 'Food'. Hope that makes sense! I know it's a long shot that it exists since excel is more of a powerhouse with numerical data and this is as categorical as you can get!

    Thanks again for your solution & taking the time to help me out, I really appreciate it! It's definitely what I'm after and will be useful even without the above mentioned tweaks.
    Last edited by emdagem; 09-08-2016 at 10:28 PM.

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Tracking time by Activity over a week period using Pivots

    There's a way to do what you want in the original request, but it will take a bit of VB code. We could put a change event on the cells you want to fill in, and then kick off a program to organize that data into the table I suggested and then refresh the pivot table. This will happen every time something is changed on the weekly calendar, but there is so little data, that it would appear to be instantaneous.

    I don't understand the second request. Could you provide a mock-up of what the data entry would look like and what the desired result would look like? It sounds like something that could be implemented. You'll probably need another table that associates categories and sub-categories.

  5. #5
    Registered User
    Join Date
    09-08-2016
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    3

    Re: Tracking time by Activity over a week period using Pivots

    Hi dflak,
    Thanks for your help, I've sorted out the spreadsheet and have it doing everything I need it to do (I've decided I don't need the weekly summaries - daily is enough).
    Thanks very much for all of your help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Need to count how many days in week period, if period starts mid week?
    By mrsdeapsleap in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-18-2016, 03:29 AM
  2. Formula for calculating biweekly pay period dates/tracking sick time
    By think0rz in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-07-2015, 03:58 PM
  3. PowerPivot - tracking data changes over the period of time
    By illusionek in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 08-07-2014, 09:15 AM
  4. Activity Time Tracker to capture activity selected from dropdown list
    By dillibabu in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-24-2013, 01:10 PM
  5. How to: identify repeat offenders within a 3 week period (week per week basis)
    By Heloc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-28-2012, 12:43 AM
  6. Sum Over A Period of Time With Different Values For Different Days of the Week
    By ljustman in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-08-2012, 12:58 PM
  7. Replies: 0
    Last Post: 09-03-2010, 05:36 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1