In this silent video you’ll learn how to create a diagonal reference line in Tableau.
Read the full article here: Diagonal Reference Line— [ http://kb.tableau.com/articles/howto/...]
- - - - - - - - - - - - - -
Step 1: Set up the view
1. Drag Profit to Columns.
2. Drag Sales to Rows.
3. Select Analysis - Aggregate Measures.
4. Select Analysis - Create Calculated Field.
5. In the Calculated Field dialog, enter the following, then click OK:
- Name the calculated field "Reference Line".
-I n the Formula field, enter [Profit].
6. Select the desired field and drag it to the Color card of the All Mark. In this example, the Sales measure is used.
Step 2: Set up the reference line
1. Drag Reference Line to Rows.
2. Right-click the Reference Line measure and select Dual Axis.
3.Right-click the Reference Line axis and select Synchronize Axis.
4. On the Marks card for All, remove Measure Names from Color
5. On the Marks card for SUM(Reference Line), change the mark type from Automatic to Line.
6.Right-click on the line and select Trend Lines - Show Trend Lines.
7.Click Color on the Marks card for SUM(Reference Line) and change the transparency to zero.
Step 3: Set up the axes
1.Right-click the Profit axis, select Edit Axis.
2.In the Edit Axis dialog box:
- Select Fixed Range.
- Change the Start value to -20,000.
- Change the End value to 125,000
- Click OK.
3.Edit the Sales axis and choose the same range as the Profit axis.
4. Right-click Reference Line on the Rows shelf and uncheck Show Header.
- - - - - - - - - - - - - -
Subscribe to the Tableau YouTube channel here: [link: http://www.youtube.com/subscription_c...]
Free Trial of Tableau: [link: https://www.tableau.com/products/trial ]