+ Reply to Thread
Results 1 to 9 of 9

Displaying Data for Current Months Only on a Line Chart

  1. #1
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Displaying Data for Current Months Only on a Line Chart

    I have a data set which records earnings on a monthly basis and compares these to target figures. I need to be able to dispaly this information in a line graph (see attached). The problem I have is that for future earnings, i.e. March to December in the sample, the figures are not yet known, resulting in the line dipping back to zero.

    I don't want to have to edit the data set each month to add the latest month, so I want to know if there is any way to specify that the line only displays the months for which there is data i.e. anything greater than zero, so in my sample it displays all 12 months for the target line but only Jan and Feb for the earnings line.

    Then each month when the earnings figure is entered, the chart extends the line to include just that months data and so on. so you don't get the line dipping back to zero?

    This isn't an issue with a bar chart, but I need a line chart.

    Many thanks

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Displaying Data for Current Months Only on a Line Chart

    No attachment

    By the way - have you checked this: http://www.tushar-mehta.com/excel/ne...ynamic_charts/
    Best Regards,

    Kaper

  3. #3
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Re: Displaying Data for Current Months Only on a Line Chart

    I'm experiencing a few problems with the site, not getting reply notifications even when set to via email and so on! Anyway, attachement hopefully attached now.
    Attached Files Attached Files

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Displaying Data for Current Months Only on a Line Chart

    But don't email - just keep reading and learning yourself :-)

    May be even easier approach. In E3:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and copy down.
    Now use column E data for your earnings series.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Re: Displaying Data for Current Months Only on a Line Chart

    No, I hadn't seen this, very useful.

    Please Login or Register  to view this content.
    I guess for me this raises the question how would I adapt the OFFSET forumla to accomodate 0 values, sadly the source data is populated with a zero by default, so if would effectively only become valid data and plottable when the value is < or > 0 in the attached sample?

    Many thanks

  6. #6
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Re: Displaying Data for Current Months Only on a Line Chart

    Hi Kaper,

    I don't have control over the source data, so whilst

    Please Login or Register  to view this content.
    works in principal, in practice I can't control the data source, which is why an adaptation of the offset code would be a much neater solution, if it is possible to adapt?

    Many thanks

  7. #7
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Displaying Data for Current Months Only on a Line Chart

    If the range is populated with 0's use COUNTIF rather than COUNTA
    So something like (or similar)
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    should do.
    See also this very simple approach from prev. post.

  8. #8
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Re: Displaying Data for Current Months Only on a Line Chart

    Thanks Kaper,

    To take it one step further, I now trying to figure out how to apply your OFFSET when the range is non-contiguous, e.g.

    Please Login or Register  to view this content.
    Struggling with this one!

  9. #9
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Displaying Data for Current Months Only on a Line Chart

    N/A to your sample file.

    in "Excel world" as opposite to real one: One spreadsheet is worth 100 pictures (while still a picture is often worth more than 100 words).

+ 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. Add chart trendline into future without displaying actual data line
    By HeyInKy in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 04-24-2014, 08:58 AM
  2. [SOLVED] Displaying current time on a chart
    By Bishonen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-08-2013, 05:36 AM
  3. Chart the last 3 Months including the current month
    By ioncila in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-14-2012, 01:22 PM
  4. Displaying data in bar form on a line chart
    By expo in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-01-2006, 07:15 PM
  5. Replies: 3
    Last Post: 02-01-2005, 04:08 PM

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