Reader small image

You're reading from  Learning Tableau 2019 - Third Edition

Product typeBook
Published inMar 2019
PublisherPackt
ISBN-139781788839525
Edition3rd Edition
Tools
Right arrow
Author (1)
Joshua N. Milligan
Joshua N. Milligan
author image
Joshua N. Milligan

Joshua N. Milligan is a Hall of Fame Tableau Zen Master and 2017 Iron Viz Global finalist. His passion is training, mentoring, and helping people gain insights and make decisions based on their data through data visualization using Tableau and data cleaning and structuring using Tableau Prep. He is a principal consultant at Teknion Data Solutions, where he has served clients in numerous industries since 2004.
Read more about Joshua N. Milligan

Right arrow

Ad hoc calculations

Ad hoc calculations allow you to add calculated fields to shelves in a single view without adding fields to the data pane.

Let's say you have a simple view that shows the Rent per Guest, like this:

What if you wanted to quickly highlight any renters who had paid less than $1,450? One option would be to create an ad hoc calculation. To do so, simply double-click on an empty area of the Columns, Rows, or Measure Values cards, or on the empty space of the Marks shelf, and then start typing the code for a calculation. In this example, we've double-clicked the empty space on the Marks shelf:

Here, we've entered code that will return True if the sum of Rent is less than $1,450 and False otherwise. Pressing Enter or clicking outside the text box will reveal a new ad hoc field that can be dragged and dropped anywhere within the view. Here, we&apos...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Learning Tableau 2019 - Third Edition
Published in: Mar 2019Publisher: PacktISBN-13: 9781788839525

Author (1)

author image
Joshua N. Milligan

Joshua N. Milligan is a Hall of Fame Tableau Zen Master and 2017 Iron Viz Global finalist. His passion is training, mentoring, and helping people gain insights and make decisions based on their data through data visualization using Tableau and data cleaning and structuring using Tableau Prep. He is a principal consultant at Teknion Data Solutions, where he has served clients in numerous industries since 2004.
Read more about Joshua N. Milligan