Last Modified Date: 01 Nov 2017
ResolutionAs a workaround, create a calculated field that will plot lines where desired.
- Drag discrete field (i.e. [discrete month]) to the Columns shelf.
- Drag measure (i.e.[profit]) to the Rows shelf.
- Select Analysis > Create Calculated Field.
- In the Calculated Field dialog box, create a formula similar to the following:
IF [discrete month]="February" OR [discrete month]="July" THEN 10000 END
- Click OK.
- Drag the newly created calculated field from the Dimensions pane to the Rows shelf, next to the [profit].
- Right-click on the calculated field and select Dual Axis.
- Go to the Marks card of the new calculated field, and change the Mark type to Bar.
- On the Marks card of the new calculated field, adjust the size of the bar to very small.
CauseThe ability to add a reference line to a discrete field is not currently available in Tableau Desktop.
Additional InformationThe attached workbook shows an example of how the above approach can be implemented.
Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Training and Tutorials