Tableau Constant Line – Adding Constant Line in Tableau
In our last tutorial, we saw Tableau Parameter Tutorial. Here, in this Tableau tutorial, we are going to learn about adding Constant Line in Tableau and different types of Tableau Constant Line with examples.
So, let us start Tableau Constant Line.
2. Tableau Constant Line
Tableau Constant Line is simply a line we add to a graph that has a value that doesn’t change. This value is typically hardcoded (or set) and is not determined by other values in the graph. For example, if we wanted to show the value of pi (3.1415927 – depending on the precision you want to show), we can use a constant line in tableau.
Let’s Discuss How to Create Sparklines Chart
3. Creating Constant Line in Tableau
These are the following steps to edit Constant line tableau:
i. Click on the drop-down in the Marks card and change the mark to Circle.
ii. From Measures, drag Salary/Winnings $ to Columns.
iii. From Measures, drag Endorsements $ to Rows
iv. From Dimensions, drag Sport to Color.
v. From Dimensions, drag Athlete to Detail.
vi. On the sidebar, click on the Analytics tab to activate it.
vii. Under Summarize, drag Constant Line from the Analytics tab and drop it on the SUM(Salary/Winnings $) placeholder:
Read about Tableau Trend Line and how to create it in detail
viii. Enter the value 20:
ix. Right-click on the constant line that was added and select Edit.
x. Set the Fill Above: color to None and the Fill Below: color to a light gray color:
xi. Right-click on the constant line again and select Format.
xii. On the Format sidebar, under the Constant Line Label section, select alignment. Set the Vertical alignment to Top.
Let’s Create a Story Line in Tableau
xiii. From the Analytics tab, drag the Constant Line again, this time placing it on SUM(Endorsements $) placeholder.
xiv. Set the constant value to 40.
xv. Right-click on the new constant line and select Edit.
xvi. Under Formatting, set the Fill Above color to a light gray color and the Fill Below color to None.
xvii. Right-click on the constant line again and select Format.
xviii. On the Format sidebar, under the Reference Line Label section, select Alignment.
Set the Vertical alignment to Bottom.
In this tutorial, we learned about adding a constant line in Tableau, functions of Tableau Constant Line with appropriate uses. Furthermore, if you have any query feel free to ask in a comment section.
Related Topic – Tableau Filter Operations