Creating Calculations Within Tableau Pills

So, as a Tableau user, we all know that we can create custom calculations by right clicking on the dimensions or measures shelves and going to “Create” > “Calculated Field”.  This new calculation will then get saved as your Measure or Dimension

But did you know, you could also create calculation within your visualisation shelves whilst creating a view. Let me show you what I mean:

Consider the following visualisation, a simple table in Tableau:

Now, say I wanted to change the Sum of Profit and create a Profit Ratio calculation (i.e. Sum of Profit divided by Sum of Sales). I can actually do this within the shelf so I don’t need to create a separate calculation for this). To do this, simply double click into the green Profit pill on the Columns Shelf, and you will see the following:

A text cursor has appeared, allowing you to type your calculation into the box. So now, type the following into the pill for our Profit Ratio Calculation:

And then press enter on your keyboard. Our view has now changed to show our profit ratio:

And that’s it, a really simple but handy tip for you guys today. Stay tuned for more.

Free Alteryx Trial!

Free Tableau Trial!

Get in touch with us today!

Contact us
Cookies make it easier for us to provide you with our services. With the usage of our services you permit us to use cookies.
More information Ok