KNOWLEDGE BASE

How To Use Arrowed Line To Show Target Period


Published: 06 Oct 2021
Last Modified Date: 06 Oct 2021

Question

How to use arrowed line to show target period

Before:
User-added image

After:
User-added image

Environment

  • Tableau Desktop

Answer

1. Create following calculations:

Is target period:

[Order Date]>=[Start date] AND [Order Date]<=[End date]

Target period:

MIN(IF [Is target period] THEN -1 END)

Target period arrow:

IF [Order Date]={EXCLUDE [Order Date]:MIN(
IF [Is target period] THEN [Order Date] ELSE #9999-12-31# END
)}
THEN '<' 
ELSEIF [Order Date]={EXCLUDE [Order Date]:MAX(
IF [Is target period] THEN [Order Date] ELSE #1899-1-1# END
)}
THEN '>' 
END

2. Drag [Target period line] to Rows

3. Right click on  [Target period line] in Rows > Dual Axis

4. Right click on  [Target period line] axis > Edit Axis... 
User-added imageUser-added image

5. Drag [Target period arrow] to Label of [Target period]'s mark card

6. Adjust format and alignment of label to match the line
User-added image
User-added image 









 
Did this article resolve the issue?