
1. Re: how to put 4 measures into one graph
D Barnetson Nov 14, 2016 7:11 PM (in response to Zhaoning Liang)2 of 2 people found this helpfulHi Zhaoning,
Depending on your measures and the data that you are working with, you can try this:
Keep your first 2 measures as individual columns in you data set (i.e.; Sales & Profit).
Then you can Pivot the other 2 measures when you're in the data source tab of Tableau.
To do this, highlight the 2 measures (i.e.; Quantity & Discount).
Then click the drop down arrow and selecting pivot.
You'll now see 2 new columns: 'Pivot Field Names' & 'Pivot Field Values'.
Now, go to your sheet and start placing your pills on the following shelves in the order below:
1. Drag your Date dimension to the columns shelf and change to 'month'.
2. Drag the measures to the rows shelf in the following order (starting from the left): Measure 1, Pivot Field Value, Measure 2.
3. Change both measures 1 & 2 to a bar and the pivot value to a line. See picture above.
4. Right click on the pivot value pill and make measure 1 and the pivot value a 'dual axis'. At this point you should have a bar graph with a line graph on top and a bar graph under it.
5. In the top left corner of the bottom bar graph's axis, you will see that you can grab the graph buy clicking on the corner. Move it up, over the top graphs axis until you see 2 bars. (this means that you can combine the 2 graphs into 1.
6. You should now see a line graph and 2 bar graphs.
7. If so, remove the 'Measure Names from the columns shelf.
8. Lastly, you will need to change the dimension from 'Measure Names' to 'Pivot Field Names' on the line color shelf.
...and there you have it:
Hope this helps.
Don

2. Re: how to put 4 measures into one graph
David Walker Nov 14, 2016 7:28 PM (in response to Zhaoning Liang)Hi Zhaoning,
If i'm reading your intent correctly, then this post by James Wright should help: https://www.interworks.com/blog/jwright/2012/06/18/multimeasuredualaxischarts#ninja
David Walker

3. Re: how to put 4 measures into one graph
Zhaoning Liang Nov 15, 2016 3:01 PM (in response to D Barnetson) 
4. Re: how to put 4 measures into one graph
Zhaoning Liang Nov 15, 2016 3:03 PM (in response to David Walker)thanks for the reply. But the method in this post looks like can just add 3 measures, how to add the 4 measure, for example, another bar and combine it to the grey bar and share with the same left axis?

5. Re: how to put 4 measures into one graph
David Walker Nov 15, 2016 3:41 PM (in response to Zhaoning Liang)Zhaoning:
this technique relies on creating a dual axis using filtered Measure Names/Values. there are many different variations, but the common denominator is one measure combined with Measure Names/Values. as you cannot duplicate Measure Names/Values, then the result is limited to a combo with one measure of one mark type and multiple measures of another [mark type].
the beauty of D Barnetson's solution is that it bypass this limitation. you effectively have another Measure Names/Values combo. Don showed four measures (as requested), but by changing the filter on Measure Names/Values and adding more columns to the pivot, you can add more.
So the answer is ... use Don's technique.
David Walker

6. Re: how to put 4 measures into one graph
David Walker Nov 15, 2016 3:42 PM (in response to Zhaoning Liang)pivot is limited to fields in the data source. you can't pivot on calculated fields.

7. Re: how to put 4 measures into one graph
James Wright Nov 16, 2016 5:53 AM (in response to David Walker)An oldybutgoody. Thanks for the mention and the memories, David!
The techniques there should still be valid, as well as the inherent limitations you describe. Ultimately, there are several less sustainable workarounds for the limitation of one MV/MN display, but I would probably suggest that there are better ways to detect, display, and act on complex multivariable relationships than a simple combined axis chart.