Troubleshoot your calculations by producing a Tableau troubleshooting view! Study the initially post in this series to get an overview of the technique.
Breaking a calculation into its valid sections tends to make it less difficult to evaluate regardless of whether every single piece is returning incorrect values. Incorrect sections warrant additional investigation though right sections can be ignored.
Produce new calculated fields for valid subsections of the calculation
Produce new ad hoc calculation from scratch
- Double-click on a shelf
- Form or paste the formula
Produce ad hoc calculation from current calculation
- Highlight a section of a calculation that is valid on its personal
- Drag the highlighted section to a shelf
Produce new calculated field
- Click the down arrow subsequent to Dimensions in the information pane
- Form or paste the formula
why: Investigating every single section of a calculation signifies you can narrow your concentrate. If there are various levels of nested functions, take into account beginning with larger chucks and operating down to smaller sized sections.
Add Sections to the view, get rid of any expressions that are returning the right values
- Drag a measure to Text on the Marks card, or drag various measures to the Measure Values card. See Developing a Text Table with Several Measures for how to get the Measure Values card.
- Drag dimensions to the Rows shelf. You could also take into account dragging a dimension to Colour on the Marks card based on your preference.
- If a section is returning anticipated values, then get rid of it from the view.
why: Right sections are irrelevant to the investigation and can be safely ignored
Format the calculation for readability
- Make a new line for every single function or expression
- Make functions and operators all caps
- Indent nested functions (You can highlight a block of text and hit Tab)
- Use comments (Any line starting with // will be commented out)
why: Seeing the complete calculation without having scrolling tends to make it less difficult to maintain almost everything in thoughts. Formatting can also enable determine valid sections that can be broken out, and functions or parenthesis that want to be closed.
- Search the precise text of the error message in Tableau’s Information Base
- Take away customized info from searches, such as field names
- Wrap phrases in quotations marks to search that precise phrase
- Cannot discover documentation on an error? Let us know! We’re normally operating to boost our documentation.
why: Tableau will only show benefits for valid formulas, so errors should be fixed initially.
Subsequent time we’ll go more than methods to confirm the information. To see it all in action, verify the Calculations Survival Guide session at Tableau Conference!