top of page
Bernard K

Quick way to rename ad-hoc calculations in Tableau

How to efficiently rename ad-hoc calculations in Tableau for faster data analysis?

Introduction

What are ad-hoc calculations? Ad-hoc calculations are calculations that you can create and update as you work with a field on a shelf in the view. They are also known as type-in or in-line calculations.

A good example of ad-hoc calculation is in the example below computing the Profit Ratio.

example of ad-hoc calculation in tableau

(Note, the above ad-hoc calculation computes the Profit Ratio, without the need of creating a new field in the data pane)

Note, executing this assigns the functions used in the calculation as the name of the calculation, see below.

Quick way to rename ad-hoc calculations.

A quick way to rename ad-hoc calculations is by using multi-line ad-hoc calculations.

Multi-line ad-hoc calculations are created by typing the first part of your calculation, in this case the name assigned to the calculation e.g., //Profit Ratio then press SHIFT+ENTER to open a new line where you can type the calculation itself e.g., SUM([Profit])/SUM([Sales])

How do you do it?

Double-click on an empty shelf to create your ad-hoc calculation.

Use double forward slashes “//” followed by your desired name e.g., //Profit Ratio

renaming ad-hoc calculation in Tableau

Press SHIFT+ENTER to open a new line.

On the new line, type your calculation e.g., SUM([Profit])/SUM([Sales]), and press enter to commit the calculation.

Note, the ad-hoc calculation is automatically renamed as ‘Profit Ratio’ as you can see in the view below.

results after renaming ad-hoc calculation in tableau

I hope this article was helpful to you. If you wish to receive more Tableau tips and tricks, kindly join our mailing list by subscribing below.

If you like the work we do and would like to work with us, drop us an email on our contacts page and we’ll reach out!

Thank you for reading!

Blog.png
Black & white.jpg

About Me

More About the Author

Bernard K

Analytics Consultant | 3X Tableau Certified

Bernard is a data analytics consultant helping businesses reveal the true power of their data and bring clarity to their reporting dashboards. He loves building things and sharing knowledge on how to build dashboards that drive better outcomes.

Let’s discuss your data challenges! Let’s work together!

bottom of page