13 Replies Latest reply on Dec 20, 2016 1:37 PM by Matthew Risley

# Help with plotting a line graph to identify a relationship

Hello All!

I undertook a questionnaire at work and I would like to plot the results from 4 of the statements in a graph. Each statement having a different colour as to differentiate between them.

I would like to create a graph like the one below which i found online - But I cant seem to get it to do this. This is just an example of what I am attempting to do.

So the coloured lines would represent each of the 4 statements, then length of time working for the company (1-5) on the x-axis and Rating they gave for each statement (1-9) on the Y-axis.

This will then enable me to see if the response or rating given to each of the statements has a relationship with the length of time the person has worked for the company.

I am seriously struggling to do what seems like it should be simple, can anyone help me here?

Below is the dataset i am trying to work with. I have also attached the dataset i am trying to use in Tableau, as well as the packaged workbook. I have been at this all day and am no further along. Please can someone please help me!

 Respondent number Length of time with company Effective (Q4) Training (Q4) Speed (Q4) Reliable (4) 2 1 7 7 7 7 4 1 8 7 4 6 6 3 6 5 8 7 7 1 7 7 7 7 8 2 4 8 2 3 9 1 7 5 7 7 11 2 7 7 7 7 13 4 9 9 3 7 15 3 7 7 6 8 17 2 7 8 9 9 18 4 8 8 8 6 19 4 7 7 3 1 21 2 7 7 5 5 22 3 7 3 3 7 24 4 7 7 7 7 25 3 7 8 7 7 28 1 9 1 8 8 29 2 6 3 2 5 30 2 7 7 3 3 31 3 7 8 6 7 32 1 7 3 4 6 35 4 7 8 3 3 37 4 7 1 3 3
• ###### 1. Re: Help with plotting a line graph to identify a relationship

Hey, Emma.

Which data set are you using in the Packaged workbook? I'm not seeing which one to use. Which 4 statements are you looking to plot?

PS: if there is any sensitive data in here, I'd remove the workbook and only attached the data you want us to see. all of your sheets are still on here

• ###### 2. Re: Help with plotting a line graph to identify a relationship

Emma,

Were you looking for something like this?

Let me know if you have any questions.

-Wesley

• ###### 3. Re: Help with plotting a line graph to identify a relationship

Hello!

If you look at the sheet entitled, master data set - I am referring to columns 8-12 called

'Duration (Q3)'   Which i hope to plot on the Y axis, and then the following 4 statements on the x-axis:

'Effective (Q4)'

'Training (Q4)'

'Speed (Q4)'

'Reliable (Q4)'

The points on the graph itself would be made up of the respondents which is the first column in the sheet, where have 51 respondents in total. So i hope to plot all 51 responses for each of the 4 statements.

Is this of any help?

• ###### 4. Re: Help with plotting a line graph to identify a relationship

Yes! That looks like what I am trying to achieve! You managed to do it quick I wish i posted earlier.

How did you manage to achieve that?

Thanks

• ###### 5. Re: Help with plotting a line graph to identify a relationship

Emma,

Drag length of time to X-Axis. Drag the measures you want onto the Y- axis until you get this "Double Bar" chart:

• ###### 6. Re: Help with plotting a line graph to identify a relationship

Emma,

Here are the steps I followed:

1. Drag Duration (Q3) to the Columns shelf and make it a Dimension from the drop down
2. Drag Measure Names to Filter and select the four measures you want to use
3. Drag Measure Values to the Rows shelf
4. Draft Measure Names to the Color Marks Card

That should do it. Let me know if it trips you up or if you're looking for something else.

-Wesley

• ###### 7. Re: Help with plotting a line graph to identify a relationship

Thats great! that seems to have got me the graph i was looking for.

Although it displays the lines as an average of the points.

Would it be possible to have it so i have all 51 of the users plotted on each line - in other wards so I can hover over an area of a line and it will tell me which respondent said gave that response on the x axis and that response on the y-axis?

• ###### 8. Re: Help with plotting a line graph to identify a relationship

For example currently when I hover over a point the tooltip tells me:

People who have been at the company for two years gave speed of the system an average rating of 5.6.

Where as i would really like to know:

Respondent number 10 - has been in the company 2 years and rated speed of the system a rating of 5.6.

Do you understand? Is there a way to also know or add in which row of the spreadsheet ie: which user is saying this information?

• ###### 9. Re: Help with plotting a line graph to identify a relationship

You can, but the only issue with that approach is that you'll get a lot of overlap of users. All 51 respondents will plot like this:

All I did to get this was change the Duration to discrete, add respondent number to the Detail marks card, and change the mark from automatic to Circle.

• ###### 10. Re: Help with plotting a line graph to identify a relationship

Another solution could be to use the line graph and then create a table with all of the responses and use the line graph to filter down the table, so you can see the responses in question. Just a thought.

1 of 1 people found this helpful
• ###### 11. Re: Help with plotting a line graph to identify a relationship

Sorry I don't know what you mean, do you have an example?

• ###### 12. Re: Help with plotting a line graph to identify a relationship

Try dragging Respondent Number to rows (in front of the measures).

This will give you a line chart for each respondent. This may be too much though.

Like Wesley is showing, there is "overlapping" data so you can't see the other points underneath.

If you search the forums or Google for how to "jitter" points, this may be another option.

• ###### 13. Re: Help with plotting a line graph to identify a relationship

Yeah! That's also a great idea.