2 of 2 people found this helpful
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.
Now, go to your sheet and start placing your pills on the following shelves in the order below:
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.
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?
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.
pivot is limited to fields in the data source. you can't pivot on calculated fields.
An oldy-but-goody. 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 multi-variable relationships than a simple combined axis chart.