Tableau Constant Line – Adding Constant Line in Tableau

FREE Online Courses: Dive into Knowledge for Free. Learn More!

1. Objective

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.

Tableau Constant Line

Tableau Constant Line – Adding Constant Line in Tableau

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:

Step. 7 Creating Constant Line in Tableau

Step. 7 Creating Constant Line in Tableau

Read about Tableau Trend Line and how to create it in detail
viii. Enter the value 20:

Creating Constant Line in Tableau

Step. 8 Creating Constant Line in Tableau

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:

Creating Constant Line in Tableau

Step. 10 Creating Constant Line in Tableau

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.

This was all in Tableau Constant Line Tutorial. Hope you like our explanation.

4. Conclusion

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
For reference 

Did you like this article? If Yes, please give DataFlair 5 Stars on Google

follow dataflair on YouTube

2 Responses

  1. Sara Lloyd says:

    how can you make that value be a decimal – i.e. “1.3”

  2. Satyalekhya Dsln says:

    good afternoon sir/madam ,

    firstly thank you that you are teaching the this content which is valuable outside , for free . It is really helpful . but comparing to remaining topics this topic is bit tough and also there aren’t any visuals of tableau in this particular topic . hope you consider this and continue to teach us .
    Thank you

Leave a Reply

Your email address will not be published. Required fields are marked *