Tips for Learning How to Create Calculations
Now that you know the types of calculations and when to use them, how do you actually know how to create the formula for them? This is where things can get tricky.
There’s no easy way to know exactly how to create the perfect formula; it takes practice and research. However, here are some ways you can start to learn:
Know your question or purpose
If you know the type of data you need, this can help you choose the correct function and format it properly. For example, if you need to show profit for an order, you might create a formula similar to the following: SUM (Sales) - SUM (Cost).
Learn Tableau functions
There are many different functions available in Tableau. Each type serves a different purpose. To learn more, see Functions in Tableau(Link opens in a new window).
Learn how to format calculations
After you’re familiar with the different types of Tableau functions and their purpose, make sure to learn how to format calculations using the proper syntax. To learn more, see Formatting Calculations in Tableau(Link opens in a new window).
Learn from other examples
Learning by example is effective. Try to collect a list of common calculations to use in your everyday analysis. There are several resources available to you:
- Tableau Blog: Top 10 Tableau table calculations(Link opens in a new window)
- Tableau Blog: Top 15 LOD Expressions(Link opens in a new window)
- Tableau Blog: Save time and stay consistent with a template of calculated fields
Still having trouble?
Ask for help on the Tableau Community(Link opens in a new window).
Also in this series:
Understanding Calculations in Tableau(Link opens in a new window)
Types of Calculations in Tableau(Link opens in a new window)
Choosing the Right Calculation Type(Link opens in a new window)
More calculations content:
Get Started with Calculations in Tableau(Link opens in a new window)
Create a Simple Calculated Field(Link opens in a new window)