×

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.

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.

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

### The Latest

• ##### Intern Dashboards: The Rise and Fall of India’s EdTech Market
Easily move to Tableau Cloud with our Tableau Cloud Migration checklist.

### KeepWatch by InterWorks

Whether you need support for one platform or many, our technical experts have you covered.

## Liz Jensen

Analytics Consultant
Alter Your Analysis: Unofficial Holidays We know what dates Halloween, Christmas, and US Independence Day are on. But what about National Dogs in Politics Day or National ...
Alter Your Analysis: Women’s World Cup Match Wins In this second installment of Alter Your Analysis, I am tackling Alteryx’s Weekly Challenge 169: “Using the values in the attached file ...

See more from this author →

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

×

Interworks GmbH
Ratinger Straße 9
40213 Düsseldorf
Germany
Geschäftsführer: Mel Stephenson

Kontaktaufnahme: markus@interworks.eu
Telefon: +49 (0)211 5408 5301

Amtsgericht Düsseldorf HRB 79752
UstldNr: DE 313 353 072

×