+ Reply to Thread
Results 1 to 9 of 9

Create a line chart using date and products

  1. #1
    Registered User
    Join Date
    01-24-2020
    Location
    Germany
    MS-Off Ver
    16.0.11328.20492
    Posts
    5

    Create a line chart using date and products

    Hello all!

    I have been trying quite hard to learn how to use Excel to create a Line chart to show number of support tickets for my products over a year. I will admit in my 10 attempts, I have learned fair bit, but I am not understanding enough to achieve what I want, neither do I know if want I want to achieve is even possible. This is what I would like to do:

    Y axis number of total tickets for all products
    X axis months January to December

    On the X axis, I'd like the ability to toggle between years
    So for example, show the number of tickets for 2017 or 2019

    On the Y axis, I'd like the ability to toggle between all products and selecting a specific product
    So for example showing all of the tickets by month for the year for one product or for all

    I have attached my example spreadsheet, it has two columns:
    Created On - currently has the date and time, I do not want or need the time. I will have data for 2017, 2018, 2019 and 2020
    Product - The number of products I have are around 120 in total

    Any advice or help with this would be incredibly appreciated. Once I see how this is done, it will fill the many holes in my knowledge and hopefully I can then build from that.

    Thank you very much in advance!
    Attached Files Attached Files

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Create a line chart using date and products

    You can use a Pivot Chart - Group your dates by Year / Month / Day, and use count of Created On as your measure. You can filter or slice by Year, Product, etc. Format chart as required.

    See attached worked example.
    Attached Files Attached Files
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    01-24-2020
    Location
    Germany
    MS-Off Ver
    16.0.11328.20492
    Posts
    5

    Re: Create a line chart using date and products

    Hi Olly, thank you so very much, this is very good, I love it and I really appreciate it!
    Is there any way to combine all of the products by month?
    Currently we see two products in February with a total of two tickets and in March we see one product two times with a total of 3 tickets.
    I would really like to see the total for all products as a value by month and show a line for total tickets for all products by month over the year.
    So this would be 12 points along the X axis.

    I will play around and see if I can figure it out.

    Many thanks again!

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Create a line chart using date and products

    Just remove the date field from the Axis section of the pivot chart, leaving Year & Month

  5. #5
    Registered User
    Join Date
    01-24-2020
    Location
    Germany
    MS-Off Ver
    16.0.11328.20492
    Posts
    5

    Re: Create a line chart using date and products

    That worked a treat, thanks!
    I am playing with this with real data, I am not sure how you did it but you somehow have the two extra fields, Months and Years, can advise how you did that please? I cannot seem to figure out it is done.

    Thanks again!

  6. #6
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Create a line chart using date and products

    As I mentioned in my earlier post - Group your dates by Year / Month / Day (right click on a date value, and select Group, then choose the time periods you wish to group by)

  7. #7
    Registered User
    Join Date
    01-24-2020
    Location
    Germany
    MS-Off Ver
    16.0.11328.20492
    Posts
    5

    Re: Create a line chart using date and products

    Thanks for the advice, I tried this, I was able to Group by Month but it does not give me the months field to add to the Axis (Categories), also I cannot seem to figure out how you get the Slicer for Months and Years.
    Any help here would be much appreciated.

    Thanks!

  8. #8
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Create a line chart using date and products

    I'm really not sure what else to say, or show you. When you group date fields in a pivot table, the group levels you create become available as fields in your pivot table. Here's a quick GIF screen recording of me creating a pivot table, grouping dates, inserting year and month slicers...

    https://excel.solutions/pivotdategrouping/

  9. #9
    Registered User
    Join Date
    01-24-2020
    Location
    Germany
    MS-Off Ver
    16.0.11328.20492
    Posts
    5
    Quote Originally Posted by Olly View Post
    I'm really not sure what else to say, or show you. When you group date fields in a pivot table, the group levels you create become available as fields in your pivot table. Here's a quick GIF screen recording of me creating a pivot table, grouping dates, inserting year and month slicers...
    This was excellent and just what I needed, to see how you did this. I really appreciate it, I learned a lot from this and I think I have what I wanted plus more. Thanks again!!

+ 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] Pivot flow chart (line) showing week, month by choice, different products
    By psjpsjpsjpsj in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 07-18-2016, 04:08 AM
  2. Create dynamic line on chart for current date
    By thassim in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 10-10-2014, 07:21 AM
  3. Replies: 3
    Last Post: 04-07-2013, 07:40 AM
  4. How to create Line chart by date. Newbie thank you
    By JerryLog in forum Excel General
    Replies: 1
    Last Post: 06-07-2012, 10:50 AM
  5. How to create a vertical reference line on a time series line chart
    By Bladebgii in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-23-2012, 10:17 AM
  6. create today date line in excel gantt chart
    By omneo in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 07-13-2010, 10:25 AM
  7. Create a chart only from products sold?
    By financialhost in forum Excel General
    Replies: 1
    Last Post: 03-24-2009, 05:27 PM

Tags for this Thread

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