# Efficient calculations: strings, IF logic and LODs

*Tableau Consultant Study Guide · Design and Troubleshoot Calculations and Workbooks · Last updated November 3, 2026 · https://www.certifyforce.com/study-guide/tableau-consultant/design-and-troubleshoot-calculations-and-workbooks/efficient-calculations-strings-if-logic-and-lods*

Spot the calculation patterns that slow a workbook and rewrite them: integer parameters behind text labels, ELSEIF and frequent-first logic, MIN or MAX instead of ATTR, Booleans, groups and aliases instead of string IFs, TODAY instead of NOW, filters on indexed fields, one-record label sources, and LOD expressions tested against table calculations, blends and join culling.

- Certification: Salesforce Tableau Consultant
- Exam section: Design and Troubleshoot Calculations and Workbooks
- Study guide: https://www.certifyforce.com/study-guide/tableau-consultant

**Official exam objective:**

> Identify and resolve performance issues caused by calculations such as string comparisons, IF THEN statements, and Level of Detail (LOD) expressions.

## What the exam expects

- Replace string comparisons with numbers or Booleans, including integer parameters that display text labels.
- Rewrite IF logic for speed: ELSEIF instead of nested ELSE IF, CASE for complex logic, and the most frequent outcome tested first.
- Choose cheaper aggregations and native features (MIN or MAX over ATTR, groups and aliases over long IFs, TODAY over NOW).
- Diagnose slow LOD expressions and test the alternatives the help pages name.
- Keep filters and labels from adding work to a large data source.

Key terms:
- **Display As:** the parameter setting that shows a text label for each underlying value.
- **ELSEIF:** an IF branch evaluated as part of the same statement, unlike a nested ELSE IF.
- **ATTR:** an aggregation that returns the value if all rows share it, otherwise an asterisk.
- **Join culling:** leaving a joined table out of the query when no field in the view needs it.
- **Workbook Optimizer:** a rules engine that checks a workbook against performance guidelines.

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Fast vs slow types | Booleans and integers beat strings and dates | [Performance Checklist](https://help.tableau.com/current/pro/desktop/en-us/perf_checklist.htm) |
| Faster aggregations | MIN and MAX perform better than AVG and ATTR | [Performance Checklist](https://help.tableau.com/current/pro/desktop/en-us/perf_checklist.htm) |
| COUNTD | One of the slowest function types | [Performance Checklist](https://help.tableau.com/current/pro/desktop/en-us/perf_checklist.htm) |
| ELSEIF vs ELSE IF | ELSEIF is faster; nested IF computes a second statement | [Create Efficient Calculations](https://help.tableau.com/current/pro/desktop/en-us/perf_efficient_calcs.htm) |
| LOD execution | In the database, as a nested select | [Create Efficient Calculations](https://help.tableau.com/current/pro/desktop/en-us/perf_efficient_calcs.htm) |
| Table calculations | Computed by Tableau on the query result set | [Create Efficient Calculations](https://help.tableau.com/current/pro/desktop/en-us/perf_efficient_calcs.htm) |
| Literal labels | Passed through to the underlying data | [Create Efficient Calculations](https://help.tableau.com/current/pro/desktop/en-us/perf_efficient_calcs.htm) |
| Assume Referential Integrity | Joined table queried only when the view references it | [Assuming Referential Integrity](https://help.tableau.com/current/pro/desktop/en-us/joins_assume_refinteg.htm) |

## Check yourself

- Where in Tableau Desktop do you run the Workbook Optimizer?
- What happens when you click Autofix on an Optimizer guideline?
- Why can RAWSQL or SCRIPT_ functions slow a calculation?
- When might a slow table calculation be worth rewriting as an LOD expression?

## Sources

- [Create Efficient Calculations](https://help.tableau.com/current/pro/desktop/en-us/perf_efficient_calcs.htm)
- [Tableau Workbook Performance Checklist](https://help.tableau.com/current/pro/desktop/en-us/perf_checklist.htm)
- [Workbook Optimizer](https://help.tableau.com/current/pro/desktop/en-us/wbo_overview.htm)
- [Assuming Referential Integrity for Joins](https://help.tableau.com/current/pro/desktop/en-us/joins_assume_refinteg.htm)
- [Data Aggregation in Tableau](https://help.tableau.com/current/pro/desktop/en-us/calculations_aggregation.htm)
- [Create Level of Detail Expressions in Tableau](https://help.tableau.com/current/pro/desktop/en-us/calculations_calculatedfields_lod.htm)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 9 linked practice questions, and unlimited timed mock exams are included with the Tableau Consultant pack (USD $19): https://www.certifyforce.com/practice-exams
