4 Replies Latest reply on Nov 26, 2012 6:02 PM by Shawn Wallwork

Hi folks, I'm not new to Tableau, but I am new to using/dealing with date-quarters. Here's the structure of my data:

This is how the data comes to me. I'm going to use Andy's Excel reshaper (on cell E2), but before I do I'm trying to determine what's the best way to deal with the 'Months' date-string in column C. It's easy enough to pull out year into another column leaving the quarter/month range. But I'm wondering what's the most appropriate (efficient/beneficial) way of restating/transforming these strings as a real quarter/month dates before bringing them into Tableau?

Thoughts? Suggestions?

Thanks,

--Shawn

• ###### 1. Re: Advice On Quarters.

You could either create an extra column in Excel that calculates the date (the 1st of each quarter, probably), or you could do the same thing in Tableau in a calculated field. In Tableau I'd probably just use a CASE statement on the first 7 characters of the string to work out which quarter.

Doing it in Excel would mean you only had to do the calculation once, rather than it being done by JET every time you query the sheet. On the other hand, if you get regular updates or new versions of the spreadsheet, the less manual fix-ups you need to do before attaching to your Tableau workbook the better.

1 of 1 people found this helpful
• ###### 2. Re: Advice On Quarters.

Thanks Richard for the advice. Since this is an annual analysis, I went with your suggestion of doing it in Excel. Seems to make more sense.

--Shawn

• ###### 3. Re: Advice On Quarters.

Or instead of CASE statement in Tableau you can use conversion and string functions:

DATE(LEFT([Months],3) + ' ' + RIGHT([Months],4))

Which will return the first date of each quarter.

• ###### 4. Re: Advice On Quarters.

That worked well Dimitri. Thanks!

--Shawn