Questions from Tableau Training: How Can I Draw a 45-Degree Angle?

Data

Questions from Tableau Training: How Can I Draw a 45-Degree Angle?

Our Certified Tableau Trainers are asked a myriad of questions each day. In this series, they share some answers.

“How can I draw a 45-degree angle in Tableau, starting from the lower left-hand corner of my view and ending in the top-right corner?”

This question came from Ece during a Desktop III class in Atlanta, as well as Christa and Erik from a Visual Analytics class in Boston. This must be a popular topic!

Perhaps you are trying to draw a line all the way from zero to a fundraising goal, or maybe you are trying to figure out who is above or below a certain threshold. Whatever the case, this will allow us to draw a line from zero to our goal or final amount.

Creating Our Calculation

While this task is straightforward with a scatter plot, this approach did not work for our use case: viewing data over time. However, by utilizing our helper functions in Tableau, we can create a calculation that will draw a line from zero all the way to the last point in our data.

Tableau: 45-Degree Angle Calculation

What this calculation is essentially doing is looking at our time series and determining what is first and last in the view. For our first mark, it will simply plot a mark at zero. For our last mark, it will plot a mark at our last sales amount. For everything else, it will simply be null, which is important. We don’t want the 45-degree line to consider any highs or lows in other months.

Plotting Our Line

Once I have my calculation, I can drop it on Rows next to my sales amount and add a trend line between my two points (right-click on one of your dots to add the trend line). I am not going to synchronize my axis; as you can see, my sales axis is much higher than my 45-degree angle line’s axis.

For some other formatting changes, I can decrease the opacity of my color on my 45-degree angle line, change the color of the trend line and hide my null indicator. You can also completely hide that second axis if you so choose.

45-Degree Angle Line Visualized in Tableau

Thanks for the great question, Ece, Christa and Erik!

Want More Questions from Tableau Training

  1. Questions from Tableau Training: Quick Filter Interaction
  2. Questions from Tableau Training: Labeling with Table Calculations
  3. Questions from Tableau Training: Speeding Up Presentation Views when Using Tableau
  4. Questions from Tableau Training: Dashboard Actions
  5. Questions from Tableau Training: Business Day Calculations
  6. Questions from Tableau Training: Adding Gaps Between Bars
  7. Questions from Tableau Training: When to Pivot Data in Tableau
  8. Questions from Tableau Training: Adding Conditional Formatting
  9. Questions from Tableau Training: Setting Weekday Start
  10. Questions from Tableau Training: How Do ZIP Codes Work in Tableau?
  11. Questions from Tableau Training: The Small Grey Bar Within a Quick Filter
  12. Questions from Tableau Training: Matching Mark Color
  13. Questions from Tableau Training: Showing the Null Indicator
  14. Questions from Tableau Training: Can I Manually Set the Colors of a Stepped Gradient?
  15. Questions from Tableau Training: How Can I Get Box Plot Data into a Crosstab?
  16. Questions from Tableau Training: How Do I Clear a Worksheet? Make a Copy?
  17. Questions from Tableau Training: Opening URL Actions Inside of a Dashboard
  18. Questions from Tableau Training: Can I Move Mark Labels?
  19. Questions from Tableau Training: How Can I Use My Current Report to Create a Viz?
  20. Questions from Tableau Training: Can I Create Text Hyperlinks on a Dashboard?
  21. Questions from Tableau Training: How Can I Transform My Crosstab into a Flat List?
  22. Questions from Tableau Training: Labeling the Top N
  23. Questions from Tableau Training: How Can I Customize Charts with Parameters?
  24. Questions from Tableau Training: Combining Measures into a Single Line
  25. Questions from Tableau Training: How Can I Create Custom Color Palettes?
  26. Questions from Tableau Training: Can a Top N Parameter be Nested Within Other Fields?
  27. Questions from Tableau Training: Conditional Scope on Tableau Calculations
  28. Questions from Tableau Training: Top Ten Plus N
  29. Questions from Tableau Training: Dynamic Label Positioning
  30. Questions from Tableau Training: Using Cross Joins to Solve Active Tickets
  31. Questions from Tableau Training: Top N Highlight Table
  32. Questions from Tableau Training: How to Use Specific Dimensions in Table Calculations
  33. Questions from Tableau Training: Moving Reference Line Labels
  34. Questions from Training: Comparing Metrics for Same Weekday in Previous Year
  35. Questions from Tableau Training: Colouring Specific Columns and Rows in a Crosstab
  36. Questions from Tableau Training: Creating a Custom Legend as a Sheet
  37. Questions from Tableau Training: How Can I Draw a 45-Degree Angle?

More About the Author

Liz Jensen

Analytics Consultant
Questions from Tableau Training: How Can I Draw a 45-Degree Angle? “How can I draw a 45-degree angle in Tableau, starting from the lower left-hand corner of my view and ending in the top-right ...
The Value of Virtual Tableau Training When you register for a Tableau training course, you have two options of how your course will be delivered: in person or in a virtual ...

See more from this author →

Subscribe to our newsletter

  • I understand that InterWorks will use the data provided for the purpose of communication and the administration my request. InterWorks will never disclose or sell any personal data except where required to do so by law. Finally, I understand that future communications related topics and events may be sent from InterWorks, but I can opt-out at any time.
  • This field is for validation purposes and should be left unchanged.

InterWorks uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to this policy. Review Policy OK