1 Reply Latest reply on Dec 18, 2018 4:40 PM by Patrick A Van Der Hyde

# Stacked Bar Chart - series with all data zeros

I've created a few stacked bar charts with the help of posts in this forum.  Now I have run into an odd behavior with some charts.  When the data is all zeros for both series and all data points in a row, the chart insists on plotting a series of zero data points as in the image below.

The green rectangle plots have a mix of zero and non-zero data points. (zeros, not NULL values)

For the red circles both series and all data points are zeros.  I would expect these to not appear, similar to the series in the green rectangle.

Example data set is below along with some settings.

Div id 13 plots a red 'zero' line across the X axis. (2nd red ellipse in image above)

Div id 14 plots correctly, no red line in last series on X axis.  (1st row in the green rectangle)

Other data series follow this pattern. As long as there is a non-zero value in at least one data point in one series the plots are correct.  If all data points in both series are zeros then the red dashes show up in plot.

 Date Div id DLP_HS DLP_LS 1/1/2018 13 0 0 2/1/2018 13 0 0 3/1/2018 13 0 0 4/1/2018 13 0 0 5/1/2018 13 0 0 1/1/2018 14 7 0 2/1/2018 14 7 0 3/1/2018 14 12 0 4/1/2018 14 29 0 5/1/2018 14 0 0

With Axis settings this way the odd behavior occurs.

With Axis settings this way the red dashes for the all zero series is not there.

We don't want uniform axis range because this is meant to be a Stacked 'Spark Bar' chart.  The data series are relative to the row itself and should not be compared to other rows. Similar to a spark line but we are attempting to show 2 series.

• ###### 1. Re: Stacked Bar Chart - series with all data zeros

Hello Martin,

did you find a solution for this?

What about a calculation for each measure to remove the zero value.

If sum([DLP_HS])>0 or sum([DLP_HS])<0 then sum([DLP_HS]) end

and If sum([DLP_LS])>0 or sum([DLP_LS])<0 then sum([DLP_LS]) end

null would now be returned for those zero values.

In my testing the zero's are still there for the bars that appear with values for the other Div id - they are just at the top and not at the bottom.

Let us know how that works and if possible please utilize this sample data in a workbook.  Packaged workbooks: when, why, how

Patrick