7 Replies Latest reply on Jul 27, 2018 5:23 PM by swaroop.gantela

I'm using the attached weekend reference workbook to show where weekends are in my workbook. However, I can replicate the shading nor can I determine how it got shaded in the first place. What steps do I need to take to get the shading to appear in my graph?

• ###### 1. Re: Shading in weekends

The bands are definitely coming from the SUM(Weekend) on the LOD. The calculation is:

IF DATEPART('weekday',[Order Date])=1 or DATEPART('weekday',[Order Date])=7 THEN 0 END

And if you change the day number you can change were the bands fall:

That's 2 and 6 (Monday & Saturday). But I can not for the life of me figure out how to change anything about the color/format. Weird one, but interesting technique to know.

Where'd you get this workbook?

--Shawn

• ###### 2. Re: Shading in weekends

Got the workbook from a different forum on how to show weekends. I can modify this workbook but can't figure out how to replicate it in another. Even with all the same columns and rows and LOD the bands don't show up.

• ###### 3. Re: Shading in weekends

The trick is the Order Date has to be discrete (blue), so all the Nulls will show white and only the weekend will be gray. Toggle between discrete and continuous and you'll see what I mean.

--Shawn

• ###### 4. Re: Shading in weekends

I figured it out. You have to set the reference lines by right clicking on the y axis.

• ###### 5. Re: Shading in weekends

Yep! Now that was counter intuitive. Thanks for posting this.

--Shawn

• ###### 6. Re: Shading in weekends

Hi,

as I'm new to Tableau, could you give me the exact steps to do that? ( if it's still possible, as I see that the original post was done 5 years ago)

Because when I go to the reference line, I can't find the weekend field that I created as something to use...

Thanks a lot

Giovanni

• ###### 7. Re: Shading in weekends

Giovanni,

I think the weekend field can be found by the reference line dialog when you click on the y-axis.

The line is just a zero with a fill above.

You would also need to make your date pill on the columns shelf discrete.