Link to home
Start Free TrialLog in
Avatar of lizziesmalls23
lizziesmalls23

asked on

How to not display null values in Chart

I want my chart to not display values if there isn't any data (or a zero, or na()) within the cell.

Excel sheet and screen shot attached for further explanation.
ExpExchange-Question.png
ExpExchange-Question.xlsx
ASKER CERTIFIED SOLUTION
Avatar of byundt
byundt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This kind of thing comes up more often with line charts - often used to display trends over time, but they can commonly have a datapoint missing in the sequence.

If this is the case, r-clicking the chart.. choose Select Data... and then click the Hidden And Empty Cells button.  Then, choose Connect Data Points With Line.
note, this only works on Line charts, not Stacked Line.
you also may need to ensure that zero values are actually entered as =NA()
If you don't want to enter these values, use a helper cell with this formula:
=IF(C4>0,C4,NA())
 - and then plot the chart on the results of the helper formula.

This works better with giving a smooth trend line for the chart, but won't deal with the issue as fixed by Byundt's suggestion where you're removing the empty white space from the right hand side of the chart.
Avatar of lizziesmalls23
lizziesmalls23

ASKER

Great explanation and thank you for the worksheet -- it fully solved my issue, appreciate that.