How to display two bar graphs and two line graphs in one view using reference line
Published: 20 Oct 2022 Last Modified Date: 21 Oct 2022
Question
How to display two bar graphs and two line graphs in one view using reference lines
Environment
Tableau Desktop
Answer
<STEP 1> 1. Connect to Sample Superstore. 2. Drag [Sales] to Rows. 3. Drag [Sales] to Rows again. 4. Right click on 2nd [SUM(Sales)] on Rows -> Quick Table Calculation -> Running Total. 5. Drag [Profit] to the view as following. 6. Right click on [SUM(Profit)] on Measure Values -> Quick Table Calculation -> Running Total. 7. Right click on [Measure Values] on Rows -> Dual Axis. 8. Open Marks of [SUM(Sales)] -> Change the graph type to "Bar".
<STEP 2 -Adding a reference line- -> 9. Drag [Profit] to Detail. 10. Right click on the Axis of Sales -> Add Reference Line 11. Set as following. 12. Toolbar -> Format -> Lines -> Change Grid Lines as following.
Thank you for providing your feedback on the effectiveness of the article.