7 Replies Latest reply on Aug 22, 2018 1:18 PM by Andrew Lloyd

# How do I create continuous line charts using integer months and integer years from separate columns?

I asked this question a while back and never got an adequate answer. In my organization, we have funky fiscal periods, so all reporting is done using integer values for fiscal week, month, quarter, year, etc. Excel has no issue with this:

For 2017, we see fiscal months 1 thru 12, and then 2018 starts and we show thru fiscal month 7. When I attempt to do this in Tableau, the closest I can get is tabular data or bars or a disconnected line:

Is there an easy way to replicate this excel behavior in Tableau?

• ###### 1. Re: How do I create continuous line charts using integer months and integer years from separate columns?

Hi Andrew, you could create a date field in Tableau by combining your year and month values.

Assuming year is the actual year, and month is an integer value, try this:

Combined Date: MAKEDATE([Year],[Month],1)

Note that in my example, year and month are continuous dimensions.

-- Glenn

• ###### 2. Re: How do I create continuous line charts using integer months and integer years from separate columns?

I'm using Tableau 2018.2 and it is telling me that is not a valid function:

• ###### 3. Re: How do I create continuous line charts using integer months and integer years from separate columns?

I can simulate the MAKEDATE functionality like this: DATE(STR([Fiscalmonth])+'/'+STR(1)+'/'+STR([Fiscalyear])) But the resulting chart is showing the actual month names and actual year. For example, it will show "January 2018" but that is misleading since Jan 2018 is really month 12 of fiscal year 2017, which is why i need it to look like the pictured excel example:

Not this:

• ###### 4. Re: How do I create continuous line charts using integer months and integer years from separate columns?

You can create a calculation like STR(Year)+CHAR(10)+STR(Month) and use that for your axis. It's closer to what you are asking for.

Also, Tableau does support fiscal years. So if you are just offset from calendar years then you can use that setting to adjust the dates shown.

Dan

• ###### 5. Re: How do I create continuous line charts using integer months and integer years from separate columns?

The fiscal calendar is not just a simple offset unfortunately.

• ###### 6. Re: How do I create continuous line charts using integer months and integer years from separate columns?

Very odd, I'm using the same version.

Is makedate not visible when you look at Type Conversion functions?

-- Glenn

• ###### 7. Re: How do I create continuous line charts using integer months and integer years from separate columns?

nope! what the heck??

EDIT: OK, the reason this is the case is because 'm connected to a SQL Server and makedate is not available with this type of data connection...