5 Replies Latest reply on Aug 7, 2016 9:24 PM by Mahfooj Khan

# How to show gaps in timelines for NULL value years

Hi there!

I have a simple problem. Say I have a timeline data of a team's performance in the leagues. I have the team's ranks over the years in the league but there have been some years when the team was not in the league (relegated). When I plot the ranks of the team over the years, I want there to be a gap for that year but by default the line drawn by tableau connects the rank points across years even if there has been a gap in between.

Basically if ranks were as follow -

2014 - 15th

2015 - relegated (null entry)

2016 - 14th

The line drawn by default by Tableau will connect the 15th spot point in 2014 directly to the 14th spot point in 2016, passing over the 2015 years, while I would like the line to END at the 15th spot point in 2014 and a NEW line to start at the 14th spot point in 2016.

• ###### 1. Re: How to show gaps in timelines for NULL value years

It shouldn't be happened. Are you using ZN() to handle the null value in your measure? Is rank measure a calculated field I guess? Can you share a screen shot of your worksheet? If you've used any calculated measure in your chart then share the formula of that measure.

• ###### 2. Re: How to show gaps in timelines for NULL value years

If you actually have the year 2015 I'm surprised the line is joined. If you don't have any entry for 2015 at all - i.e. Tableau is creating it (or displaying it actually as no value will have been created for it) there's a way around this.

Make your Year a discrete (blue) value and 'Show missing values'

• ###### 3. Re: How to show gaps in timelines for NULL value years

Andrew If there is no entry for year 2015 then in discrete/continuous line also it will not join. See this with continuous

With discrete

If the user has handled nulls using ZN() in the measure then it'll join the join with deep spike at zero line.

Correct me If I'm wrong.

Mahfooj

• ###### 4. Re: How to show gaps in timelines for NULL value years

I didn't actually use the ZN at all Mahfooj Khan, however your example makes it clear handling nulls in that way joins the line. As an FYI as much as anything, as I'm not sure what the underlying data of the OP actually looks like, these were the scenarios I ran and the results:

With the date in the data but with a null Position:

When charted Continuous it gives:

and Discrete:

WIth the dataset altered, where we have no entry at all for 2015:

When charted Continuous it gives different results to the previous example:

And discrete:

This is why I said what the data actually looks like behind the scenes matters, whether the year does actually exist in the data with a null position or whether it isn't in the underlying data at all.

• ###### 5. Re: How to show gaps in timelines for NULL value years

Yeah that might be the case. You're right without seeing the underlying data we can't predict what may be the case.