4 Replies Latest reply on Oct 26, 2016 10:30 AM by Simon Runc

# Line graph with dates is extremely easy with Excel/Google - I can't figure out in Tableau

I have an VERY simple set of data in which an amount is show per month for 2 items, for example:

ServiceJanuary
FebruaryMarch
Store-A10208
Store-B152512

This extends to the whole year and not just 3 months^

In Google Sheets or Excel I simply select all -> right click and insert bar chart and I'm done. In Tableau after 30 minutes I have nothing... with no clue on how to accomplish this through many Google searches.

For some reason Tableau isn't smart enough to realise the columns with numerical amounts are months. I'm hoping this is something very simple I have missed.

• ###### 1. Re: Line graph with dates is extremely easy with Excel/Google - I can't figure out in Tableau

Bob

Is that what you want?

If so, you need few steps:

first you need to pivot month together:

Second you need to help Tableau to recognize your month to acceptable format using below format:

You can change few things inside of formula, (say instead of 2016, you can use other years and etc)

Please let me know if you have any questions. Also, attached sample workbook.

Sherzod

• ###### 2. Re: Line graph with dates is extremely easy with Excel/Google - I can't figure out in Tableau

hi Bob,

So the first thing to say is that both Excel and Google Sheets (both of which I do like...especially Google Sheets) are spreadsheets, and so (IMHO) are for very different things. Below is a slide from my Tableau training deck on the subject

As such Tableau is more like a database than a spreadsheet. As such it generally wants the data dimensions to go page-down and not page across. This is very similar to Pivot tables in Excel/GSheets, where you'd want the date to go down the page, else it's very hard to navigate around (defeating the point of a pivot). Using set theory is also why Tableau can operate of 100s of millions of rows in seconds and spreadsheets struggle with a few hundred thousand (less for GSheets)...OK rant over!!

So there are 2 (main) options here. One is to keep the data as is, and use the Tableau generated Measure Names/Values to lay our your multiple columns

The other option is to Pivot the data, using Tableau's Pivot function (available to Spreadsheets and .csv files)...I've attached a .gif below

Once it's formatted this way, laying out the chart is simple and fast. You can now also have things like a single filter for Month, so could filter out month Jan, and see a total (say) for Feb and March. In your original data structure, each month is its own measure.

Hope that helps and makes sense (I've attached an example of both)

• ###### 3. Re: Line graph with dates is extremely easy with Excel/Google - I can't figure out in Tableau

Thanks for the response, I understand the different between a spreadsheet and visual data tool, I also understand the ability for spreadsheets to be used visually.

Though the solution above works find I find it ridiculous that I have to both pivot the data AND change the date format using a function and Tableau cannot intelligently figure this out.

The software can be judged on how it accomplishes easy tasks and not just complex one and this is a total failure.

• ###### 4. Re: Line graph with dates is extremely easy with Excel/Google - I can't figure out in Tableau

hi Bob,

Well it really comes down to the "Cell Based" vs "Set Based" approach that Tableau takes. From my use of other BI tools they operate on the "Set" paradigm too. This has to do with the amount of data BI tools (generally) need to handle, vs spreadsheets. There are also a lot of other advantages (eg. Filtering, Aggregation, Multiple Measures - if you wanted to plot both Sales and Margin, together, by month with month going page across that would be tricky in Excel, not impossible but not "out of the box").

The convert to date, that Sherzodbek showed, is just so Tableau knows the order (I didn't in mine, as coincidentally the first 3 months are also in Alphabetic order).

Neither Excel or Google Sheets actually understand the order of the Months (as Strings)...here I've switched the cell order

However, there are also other advantages...Tableau has a very rich arsenal of functionality for understanding and handling dates. So for example, if all your data was by Day, so 01/01/2016, 02/01/2016...without doing anything you could look at your data by year, quarter, month, week...etc and be able to expand up and down this hierarchy.

Appreciate the change of data-structure takes a bit of time (I had mainly used Excel for data analysis prior to finding Tableau), but well worth the effort...all (of course) IMHO!!!