+ Reply to Thread
Results 1 to 24 of 24

Not Displaying Data on a Line Chart

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

    Not Displaying Data on a Line Chart

    Appologies - This post got posted twice in error

    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
    Attached Files Attached Files
    Last edited by HangMan; 05-15-2015 at 04:03 AM.

  2. #2
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Not Displaying Data on a Line Chart

    Hello
    Not sure if this is the active post of the two but see the attached example for a couple ways you might do this.

    DBY

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

    Re: Not Displaying Data on a Line Chart

    Hi DBY,

    Okay, thanks for this, on my real chart, the data is made up from non-contiguous cells. I'm struggling to adapt the OFFSET formula...

    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Not Displaying Data on a Line Chart

    Hi
    I'll give it some thought and try and get back to you. Unless someone else comes in with some ideas in the meantime.

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

    Re: Not Displaying Data on a Line Chart

    Okay, many thanks, I appreciate your help...

  6. #6
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Not Displaying Data on a Line Chart

    The best way I think would be to create a column data series by transposing the non-contiguous cells with formulas. See amended attachment.

  7. #7
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Red face Re: Not Displaying Data on a Line Chart

    Deleted this post the formula was in error when I tested it out as it puts the numbers in the wrong position. Should have realized. Sorry!
    Last edited by DBY; 05-15-2015 at 05:43 PM. Reason: Deleted original post

  8. #8
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Not Displaying Data on a Line Chart

    Post was entered twice by mistake!

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

    Re: Not Displaying Data on a Line Chart

    I'll take a look and come back to you, probably tomorrow now...

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

    Re: Not Displaying Data on a Line Chart

    So, I could use

    Please Login or Register  to view this content.
    to get the value from every second column, the part I'm struggling with is how to use COUNTIF to determine when the value in every second column <> 0 to determine the width part of the OFFSET.

    Please Login or Register  to view this content.
    On its own this seems to count the number of cells that 'are' zero, rather than <> 0.

    Combined this gives me:

    Please Login or Register  to view this content.
    So I think the first half works but the COUNTIF part used to determine the width of the OFFSET isn't working and I can't see why?

  11. #11
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Not Displaying Data on a Line Chart

    Hi
    I'm assuming from your last post that transposing them into a new column as in my last attachment is not an option you wish to consider as it seems the easiest way to achieve this. The named range way is tricky because Offset will return a continuous range whatever you do the countif merely tells it how far to extend. I'll give it some thought or maybe another member might have a solution.

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

    Re: Not Displaying Data on a Line Chart

    Sadly because of the nature of the data, this isn't an option.

    I think the formula is close, I just can't figure out how to count every other column to check when the cell <> 0 to define the width of the OFFSET.

    Any thoughts?

  13. #13
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Not Displaying Data on a Line Chart

    I don't see as the formula's close as it only returns a single value and has to be dragged across the page to produce an array and you say you don't want this ,as in my example. The named range needs to produce an array of values in a single formula.

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

    Re: Not Displaying Data on a Line Chart

    Okay, I think you're right, it's not close, now that I see what it is actually doing, so likewise

  15. #15
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Not Displaying Data on a Line Chart

    Take a look at the attached file, Sheet2. Is this any thing like?

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

    Re: Not Displaying Data on a Line Chart

    That seems to work, though I noticed you'd replaced the zero's with blanks. I put the zero's back in and whilst that still 'appears' to work, does it the use of NA() still apply when there is a 0 in the cell of only if there is nothing in the cell at all. Sadly I can't alter the source data and there are zeros in the cells when there is no data yet for the relevant month. Will this potentiall cause problems?


    Please Login or Register  to view this content.
    I also changed the >0 to <>0 to allow for negative numbers.

  17. #17
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Not Displaying Data on a Line Chart

    Now you've adjusted the formula to accept negative values, cells that are zeros or blank will generate an #N/A value and not be charted. The chart simply won't see those values.

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

    Re: Not Displaying Data on a Line Chart

    Okay, that's great...

    One additional problem is, that on my actual chart, I also need to plot the Forecast Data as well and if I just select the non contiguous cells C4, E4, G4 etc through to U4, it squashes the 10 months of data into half the chart, as in ten months of forecast data is shown across the first 5 months only, instead of displaying it across the full 10 months.

    I assume that a similar formula would be needed for the forecast data, but how would I adapt this, so it picks up the forecast figures rather than the actual figures?

  19. #19
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Not Displaying Data on a Line Chart

    See version 4 attached is this what you're looking to do?

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

    Re: Not Displaying Data on a Line Chart

    This is exactly what I want, I'm having a problem on my real charts where the X Axis M1 to M12 are still squashed into 6 months, even though the forecast and actual lines appear to be plotted correctly! I need to try and figure out what is going on, but I think this in theory works, so many thanks for the time you've taken looking at this.

    I'll come back if I still can't figure out why this isn't working properly on my real charts!

  21. #21
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Not Displaying Data on a Line Chart

    You're welcome. With a name like 'Hangman' I thought I better stick with it!

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

    Re: Not Displaying Data on a Line Chart

    So the problem seems to be, looking at your last example, that it is plotting 20 points rather than 10 points, so the X Axis should basically say M1, M2, M3, M4 etc, and not M1 Forecast, M1 Actual and so on and then plot both the forecast and actual for M1, then M2 and so on.

    This is why on my real chart, the X axis is being squashed into half the graph...

    Any ideas how to resolve that?

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

    Re: Not Displaying Data on a Line Chart

    I'm glad you did, I would never have figured out how to get this far... Just need to resolve the X Axis, will this require another formula to resolve or is there another way to fix this?

  24. #24
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Not Displaying Data on a Line Chart

    If we can't add anything to the spreadsheet layout and it has to be done with named ranges, the only thing I can think of is to double space the categories and offset the Forecast range to line up with the 'Actual'. See example 5 attached.

+ 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. Displaying the month name in a line chart
    By seoer in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 06-10-2014, 01:59 AM
  2. 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
  3. Displaying a average line on a pivot chart
    By excelaspire0219 in forum Excel General
    Replies: 2
    Last Post: 01-29-2009, 04:22 PM
  4. [SOLVED] 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