Skip to main content

 

ThoughtSpot

Add a formula to a search

Overview

Explains what the feature is or what its benefits are to the user or customer.

Feature

You can add a formula directly within a search. Some common reasons for using a formula in a search are to perform mathematical functions, check for and replace null values, or add if...then...else logic.

To create a formula in a search:
  1. Start a new search, or choose an existing answer from a pinboard to edit.
  2. If the answer shows a chart, switch to Data View.

    Figure: Switch to Data View

    File:01_The_Basics/User_Guide_3.5/030/030/010/switch_to_data_view.png
  3. In the upper right hand side of the table, click Actions and select Add formula.

    Figure: Create a new formula in an answer

    File:01_The_Basics/end_user_guide_bookmap/030/030/010/create_formula_in_answer.png
  4. Type your formula in the Formula Builder.

    Figure: Use the Formula Builder

    File:01_The_Basics/end_user_guide_bookmap/030/030/010/formula_builder.png
    Note: Formulas elements are color coded by type and can include the formula operators and functions? (blue), the names of columns (purple)?, and/or constants? (black).
  5. You can see a list of formula operators with examples by clicking on Formula Assistant.

    Figure: Examples in the Formula Assistant

    File:01_The_Basics/end_user_guide_bookmap/030/030/010/formula_assistant.png
  6. If you want to change what your formula returns, use the Advanced settings.
    Depending on your formula, you may be able to change:
    • Data type
    • ATTRIBUTE or MEASURE
    • Aggregation type

    Figure: Advanced settings in the Formula Builder

    File:01_The_Basics/end_user_guide_bookmap/030/030/010/formula_advanced_settings.png
  7. Name the formula by clicking on its title and typing the new name. Click Save.
  • Was this article helpful?