![](https://www.thedataschool.co.uk/content/images/2023/04/boolean-header.png)
![](https://www.thedataschool.co.uk/content/images/2023/04/mini-break-1.png)
A quick blog post on a what Booleans are and how they're created in Tableau :)
What is a "Boolean"?
A boolean is any calculation that returns as True / False.
These are created when you include either a Comparison Operator or a Logical Operator within a calculation. You'll notice this little "T|F" symbol when a boolean is present in Tableau:
![](https://www.thedataschool.co.uk/content/images/2023/04/break-13.png)
![](https://www.thedataschool.co.uk/content/images/2023/04/boolean-image.png)
![](https://www.thedataschool.co.uk/content/images/2023/04/break-11.png)
Comparison Operators
Examples of Comparison Operators in Tableau:
• Equal to (=)
• Not equal to (<>)
• Greater than (>)
• Greater than or equal to (>=)
• Less than (<)
• Less than or equal to (<=)
![](https://www.thedataschool.co.uk/content/images/2023/04/break-12.png)
Logical Operators
Examples of Logical Operators in Tableau:
• AND
• OR
• NOT
![](https://www.thedataschool.co.uk/content/images/2023/04/break-16.png)
![](https://www.thedataschool.co.uk/content/images/2023/04/break-14.png)
Booleans and Colour
One cool way to use boolean calculations is to differentiate marks by colour.
For example, let's say we've built a Sales vs. Profit scatterplot in Tableau, and added States to the details mark (using "Superstore" data):
![](https://www.thedataschool.co.uk/content/images/2023/04/break-15.png)
![](https://www.thedataschool.co.uk/content/images/2023/04/Booleans-2.png)
![](https://www.thedataschool.co.uk/content/images/2023/04/break-17.png)
If we created the boolean calculation "SUM(Sales)>100000" and dragged it to Color, the States above £100,000 in Sales are computed as True, and can be assigned a particular colour. Likewise, States that are below this value will be computed as False.
![](https://www.thedataschool.co.uk/content/images/2023/04/break-18.png)
![](https://www.thedataschool.co.uk/content/images/2023/04/Booleans-1.png)
![](https://www.thedataschool.co.uk/content/images/2023/04/break-19.png)
And that's my short summary on booleans, hope this helps!