Plotting multiple lines in Tableau

Francopd picture Francopd · Jun 22, 2017 · Viewed 13.7k times · Source

I read every possible forum and I couldn't find a specific answer. I'm new to Tableau and I need to perform what I thought would be a very simple task but I can't figure it out.

I need to create a chart with multiple lines plotted in the same graph. On one column, I have a timestamps in seconds (decimal). For each timestamp value, I have 4 columns associated (Temperature, Pressure, Humidity, Voltage) and I need to visualize how they trend over time. The data in Excel looks something like this (I simplified it for visualization purpose):

enter image description here

In Excel, it takes me less than seconds to obtain a chart that looks like this:

enter image description here

How can I replicate the same exact chart in Tableau? I would like someone to tell me exactly how each column should be formatted, if the data has to be a dimension or a measure and data type for each (string, number etc) and what steps to take in the chart. I would do this in Excel but the file is almost 1M rows and Excel keeps crashing.

Answer

Mehul Katara picture Mehul Katara · Jun 23, 2017
  1. drag & drop measure values & timestamp.

    enter image description here

    EDIT - first make Timestamp a dimension instead of a measure, and make sure it remains continuous instead of discrete. So you should not see the word SUM in front of Timestamp

  2. remove no. of row & timestamp from the measure values.

    enter image description here

  3. uncheck aggregate measure.

    enter image description here

EDIT this step is not usually needed or desirable. If you do have multiple recordings per Timestamp, you will want to select the best aggregation function for each measure, perhaps AVG or MEDIAN instead of SUM

  1. select line from mark and drag measurement to color

    enter image description here