Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Plotting multiple lines in Tableau

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.

like image 639
Francopd Avatar asked Jun 22 '17 17:06

Francopd


People also ask

How do I make a continuous line graph in tableau?

The simplest way to create a continuous line chart is just to ctrl + select a date field and a measure in the data window and then click on continuos lines in the Show Me panel. Tableau will automatically draw the chart for you.

Can a graph have multiple lines?

A multiple line graph shows the relationship between independent and dependent values of multiple sets of data. Usually multiple line graphs are used to show trends over time. In the graph, each data value is represented by a point in the graph that are connected by a line.


1 Answers

  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

like image 108
Mehul Katara Avatar answered Oct 05 '22 02:10

Mehul Katara