4 Replies Latest reply on Dec 28, 2017 1:51 AM by Leanne Vermeulen

# Conditional Line Formatting without Breaking Data Points

I have a line graph that shows values by week ending dates. I would like to apply conditional formatting for dates that fall within certain periods; so if dates fall before a certain date then the line would be "Color1" and any dates after that period would be in "Color2". The problem is that when I try to apply this type of conditional formatting, then it causes a line break between data points at the specified conditional date.

According to this article: Data Points in Line Chart Not Connecting Using Continuous Date | Tableau Software the reason this causes a line break is because it's not a "continuous" field; which obviously makes sense. But does anyone know of any way around this? So that I can apply the conditional color formatting without breaking the line? Thanks!

• ###### 1. Re: Conditional Line Formatting without Breaking Data Points

PS I've tried creating a calculated field that specifies numeric values instead of string values and set that to continuous; but I still get the same problem.

• ###### 2. Re: Conditional Line Formatting without Breaking Data Points

Goedemiddag Leanne,

Upfront, not perfect;) but find my 2 "alternative" approaches as reference and stored in attached workbook version 10.4 located in the original thread.

A. based on dual acces

B.  Approach based on diverse colour in 2 steps. Not clear where step is made exactly in middle of the range??

Regards,

Norbert

• ###### 3. Re: Conditional Line Formatting without Breaking Data Points

Hi Leanne,

Depend on the needs which color you want to show on the breaking area, you need to change the background color anyways.

Put dual axis and remove the color code from new one. And set measure name as color with background.

Don't forget to synchronize axis.

Regards,

Shin

1 of 1 people found this helpful
• ###### 4. Re: Conditional Line Formatting without Breaking Data Points

Thanks everyone - this solution was the simplest alternative.

I actually realized I didn't outline the problem correctly as I forgot to mention that I needed this to be applied to an existing dual axis (that currently contains separate measures). And so none of these workarounds will actually work in that scenario because of the required third axis; but after playing around with it some more I realize that's just not something I'm going to be able to get around at this point. Thanks for the responses, though!