1 2 Previous Next 15 Replies Latest reply on Mar 28, 2014 7:13 AM by Shawn Wallwork

# Rolling Date Range as Axis

Hello all,

I am trying to create a date axis to plot data against (specifically a gantt) that is fixed, monthly, and rolling 4 quarters (1 past, current, & 2 looking ahead). Is there a way for me to create a rolling axis then plot durations based on tabe data? Am I thinking about this all wrong?

• ###### 1. Re: Rolling Date Range as Axis

Should be possible,  Just create a filter for the period (rolling 4 quarters)

If

and

then

'true'

else

'false'

end

Put this in a calculated field, name it however you want and drag it to the filtershelf, filter for true.

Next drag your date dimension to the columns or rows shelf and drill it down to the level of aggregation you want (month)

If you could post your workbook, I try and setup an example using your (dummy) data.

edit: it seems there was some "left over" comment left in this comment, removed it.

1 of 1 people found this helpful
• ###### 2. Re: Rolling Date Range as Axis

Marc the short answer is Yes. I recently did something similar to what you seem to want using TODAY() and some calcs to get the date ranges I was looking for. Read this:

And figure out the best way for us to help you. Thanks,

--Shawn

• ###### 3. Re: Re: Rolling Date Range as Axis

Attached is a clean workbook with some sample data. What I'm really trying to do is create a gantt, showing projects across appropriate durations on a rolling 4 quarters. I fooled with the formula that you provided, and I have it working to some extent, but I can't figure out how to get projects to display 'start' and 'end' dates in the gantt. Thought I could do something by measuring project duration, but I'm not tracking the logic well enough at this point.

Sincerely appreciate your help though. Once I get this date stuff sorted I think I'll be off to the races.

• ###### 5. Re: Re: Rolling Date Range as Axis

It was my understanding that if my data was imported into Tableau as a table (ie, not linked to a source, but static) that I wouldn't need to save as .twbx. I stand corrected. Sorry for the confusion - just learning.

• ###### 6. Re: Re: Rolling Date Range as Axis

Not a problem Marc. All you need to do is go to File\Export Packaged Workbook and then post the resulting workbook here; it will have a twbx extension. BTW, a .twbx is really just a zip file by a different name. When you create a twbx Tableau grabs everything it needs to produce your viz and zips it up. That way if you have logos, or custom shapes, and several different data connections everything gets scooped up.

Hope this helps,

--Shawn

• ###### 7. Re: Re: Re: Rolling Date Range as Axis

Attached with the .twbx.

• ###### 8. Re: Re: Re: Rolling Date Range as Axis

Thanks Marc, I'll have time tomorrow, unless someone else jumps in.

--Shawn

• ###### 9. Re: Re: Re: Re: Rolling Date Range as Axis

Marc this should get you going in the right direction...

Cheers

--Shawn

• ###### 10. Re: Re: Re: Re: Rolling Date Range as Axis

That is a phenominal amount of help. Thank you very much. I never would have thought to add dimensions to limit the plot but it makes perfect sense now that I see it. Thank you.

• ###### 11. Re: Re: Re: Re: Rolling Date Range as Axis

Glad it worked for you! You're welcome.

--Shawn

• ###### 12. Re: Re: Re: Re: Re: Rolling Date Range as Axis

In digging a little bit deeper, I think something isn't quite right. If you look at the attached dataset Project #5 begins on 2/12/2014 but is displayed as starting at the beginning of the quarter. The duration is correct and the displayed end date is incorrect because the displayed start date is wrong.

The issue is displaying quarters in the Axis down at the bottom, but plotting days. Any ideas?

• ###### 13. Re: Re: Re: Re: Re: Rolling Date Range as Axis

Marc, I'm not sure what you are talking about:

I added a 2/12/14 reference line. Project #5 starts where it is suppose to and ends when it is suppose to. Are you seeing something different?

--Shawn

• ###### 14. Re: Rolling Date Range as Axis

If you switch the column "Limit Start Date" from exact day to Quarter you'll see what is happening. Intent is to display correctly with Quarterly in x-axis.

1 2 Previous Next