Operators are special symbols that perform specific mathematical, logical or comparison operations on data. They are mainly used in calculated fields, formulas and expressions to manipulate values, combine conditions or compare results. By using operators, users can create more dynamic calculations and perform complex data analysis within Tableau.
Tableau provides 3 categories of operators:
Arithmetic Operators: Used for mathematical calculations such as addition, subtraction, multiplication, division, modulus and power.
Relational Operators: Compare two values and return a Boolean result (True, False or Null).
Logical Operators: Combine or negate conditions, often used in filtering and conditional logic.
Steps to Use Operators
Step 1: Open Tableau and connect to a dataset.
Here we are going to use in-built Superstore sample dataset.
Step 2: Go to the Data tab and select Create Calculated Field