+ Reply to Thread
Results 1 to 11 of 11

Extracting data for month-by-month graph

  1. #1
    Registered User
    Join Date
    07-06-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2016
    Posts
    17

    Extracting data for month-by-month graph

    Hi all,

    Got really helpful tip earlier when I was having alot of trouble trying to fix my date format. I was hoping to ask for a little more advice

    This is how I have my data at the moment. Basically I have a record of everytime a purchase was recorded, time and date.

    I want to show the data on line graph with purchases per day as the Y-axis and months of 2012 as the X-axis. Apologies if this is a stupid question - I can't wrap my head around how to exact the data I have (B) onto a graph.

    Any guidance would be really appreciated


    Cheers,

    Joseph

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Extracting data for month-by-month graph

    Hi Joseph,

    Find the attached with some fake data and a Pivot Chart to do what I think you want. I needed to group the dates in the Pivot Table by Month for it to display better.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    07-06-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2016
    Posts
    17

    Re: Extracting data for month-by-month graph

    Thank you very much for the reply, apologies I didn't put up a sample workbook, it's 4.30am here so can't take it in at the moment, will have a good look through it when I get up

    Thanks again, Joseph

  4. #4
    Registered User
    Join Date
    07-06-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2016
    Posts
    17

    Re: Extracting data for month-by-month graph

    Thanks, just had a look through it now.

    Am getting a bit stumbled. I put in my date data in form dd/mm/yyyy and have tried to get the table to accept the new data to no avail. I do not need the time of purchase data, but deleting that seems to mess with the table too.

    I've attached the book as I have it now, would be fantastic if you could have a quick look:
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-06-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2016
    Posts
    17

    Re: Extracting data for month-by-month graph

    Test111111

  6. #6
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Extracting data for month-by-month graph

    if i understand your quandary correctly, you need to update the Data Source for the Pivot Table.

    select any cell WITHIN the Pivot Table (label or data cell, doesn't matter). now, a new menu item called PivotTable Tools should become available in the ribbon. then follow this navigation:

    ALT > JT > I > D

    that should bring up the window for entering Data Source range. see if updating that helps your cause as far as accepting new data is concerned.

    now to the next question - you say that you do not need the Time of Purchase; what in place of that do you want to aggregate on, the dates?
    Last edited by icestationzbra; 07-07-2012 at 10:11 PM.
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  7. #7
    Registered User
    Join Date
    07-06-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2016
    Posts
    17

    Re: Extracting data for month-by-month graph

    So I had tried that, changing the data source to all of my data but it seemed to completely mess up the table and graph.

    What I need the table to do is: go through the column A with all my date data (in format: 12/06/12 dd/mm/yyyy) then categorize it into months (e.g. 140 transactions in July) then graph that on a line graph with Purchases on the Y axis and Months on the X axis. The sample data Marvin gave me above did that exactly (although it has TimeOfPurchase which I don't need and seems to affect the table/graph) but I can't seem to input my own data into it.

  8. #8
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Extracting data for month-by-month graph

    you mean something like this?

  9. #9
    Registered User
    Join Date
    07-06-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2016
    Posts
    17

    Re: Extracting data for month-by-month graph

    Oh wow, yes that is exactly it!

    How did you add the new data, did you have to manually add the months under Row Labels and then tell it to calculate how many there were, I need to do more books like this / add on to this - how would I go about doing that?

    Sorry for the barrage of questions

    You're a massive help

  10. #10
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,318

    Re: Extracting data for month-by-month graph

    Joseph, one question, what do you want to see in the pivot table? It appears the count is 8334, but do you want to count all those cells since only 1501 have a purchase time in column B?
    HTH
    Regards, Jeff

  11. #11
    Registered User
    Join Date
    07-06-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2016
    Posts
    17

    Re: Extracting data for month-by-month graph

    The TimeOfPurchase was added by Marvin above (fake data) I do not need Time, just the dates totaled and graphed month by month - hope that makes sense?

  12. #12
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Extracting data for month-by-month graph

    in order to group dates into Month (or Quarter), you would just highlight any cell along the Date field, right-click and select GROUP. you should see options to group by Months, Quarters etc.

    since you do not want the Time of Purchase, and just want to count the number of occurrences of Date, you just need to drop the Date field into the Values area of the Pivot Table. to do that, right-click on any cell WITHIN the Pivot Table, choose Show Field List. in the pane that appears on the right-hand portion of the screen, drag the Date field and drop it into the Values area. it should appear automatically as Count of Date. depending on your requirement, you can change from Count to Sum or anything else by clicking on the little downward arrow, choosing the Value Field Settings option and following prompts on the ensuing window.
    Last edited by icestationzbra; 07-07-2012 at 10:45 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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