KNOWLEDGE BASE

How To Convert A Solid Line Graph Partially Into Dotted


Published: 17 Jul 2020
Last Modified Date: 24 Aug 2022

Question

How to convert a solid line graph partially into dotted. Example show a dotted line for measure values corresponding to a measure name called forecast
User-added image

Environment

  • Tableau Desktop

Answer

Step 1: If you have different measures for the values plotted as line, pivot them so that you have measure names in one column and values in another.

Step 2: Duplicate pivot field values on rows.

Step 3: Create a calculation that creates category for every measure name like below (Here the measure names are Actual Value,Forecast Value, Planned Value):

IF  [Pivot Field Names]="Actual Value" then "actual"
ELSEIF 
[Pivot Field Names]="Forecast Value" then "forecast"
ELSE
"planned"
end

Step 4: For the second measure, change the Mark type to Circle, use the above calculation onto color and choose the color for the desired dotted measure name to be white.

User-added image

Step 5: Right click on second measure in rows and select Dual axis.
Did this article resolve the issue?