6 Replies Latest reply on Jun 21, 2018 6:25 AM by Simon Runc

# For line graphs why start value have -1

Hi,

When i have columns that have values of zero in the line graph, the line graph has a fixed start of -1 instead of 0 for columns that have no existing records within my data model.

Here is my view:

Sepember, October, and March have no existing records and thus their value is zero according to my function below:

IFNULL(Sum({include [Incident Sys ID] : min(if [Severity Level] = "P1" then [# of Incidents] end)}),0)

Is there any workaround or if tableau is fixing this to combat this anomaly?

Any help would be appreciated.

Thanks,

Shahin

• ###### 1. Re: For line graphs why start value have -1

Hi, Shahin

Have you tried something like using the fixed start as shown below by editing the axis?

ZZ

• ###### 2. Re: For line graphs why start value have -1

hi Shahin,

So this is just the way Tableau behaves!

I believe (to give you a reason) this is because it has chosen to plot your Axis Marks/Scale at every 1 (the grid lines). Now when it plots the values at zero, part of the line is below the 0 axis and part above (just the thickness of the line + the little marks at each point) as it's plotting the line centered on zero. This means it would "cut-off" a tiny bit of the line/mark if it stopped the axis at zero. As it's plotting the axis in increments of 1, it goes to -1 as the extent of the axis it needs to be to include the entire line/mark and maintain it's scale of showing an axis mark every 1 unit. Hope that makes sense?

How to fix it...if you definitley won't have any negative values, you edit the axis to start at 0, but leave the other end "Automatic"

• ###### 3. Re: For line graphs why start value have -1

I tried that and the lines and points on the 0 line gets slightly cut where you barely see the dotted points of as seen below which looks odd in terms of formatting:

• ###### 4. Re: For line graphs why start value have -1

It will cut of some of the lines and points if i do it that. I tried this trick before. But thanks for your help.

• ###### 5. Re: For line graphs why start value have -1

Hi, Shahin

Does something like -0.5 as start work?

ZZ

• ###### 6. Re: For line graphs why start value have -1

Yes so that's why Tableau does it!!

If you change your measure into a decimal (I'm assuming it is currently a Whole number), you can then choose the option to start at a tiny bit below the axis (keeping the other end Automatic)