Use Einstein Copilot

Supported in Tableau Prep Web Authoring version 2024.2.

With Einstein Copilot, simply describe a calculation and Einstein will assess the formula. With one click, you can add powerful calculated fields for your Prep flows. Previously, creating formulas for calculated fields required an understanding of objects and fields, available functions, and various limitations based on data types, formula types, and more. Einstein greatly simplifies the task of creating custom functions. Einstein Copilot allows technical and non-technical users to easily create calculations using plain language. With the ability to quickly and efficiently create both row-level and summary formula fields from natural language descriptions, you can perform data preparation, making it easier and faster to combine, shape, and clean data for analysis.

Note: You must have Tableau+ and a connection to a Salesforce org with Einstein generative AI set up to use Tableau Prep generative AI features. For more information, see Turn On Tableau AI for Your Site(Link opens in a new window).

Create Calculated Fields

  1. Click on a clean step in the Flow pane.

  2. In the Profile pane toolbar, click Create Calculated Field, or in a profile card or data grid, click the More options menu and select Create Calculated Field > Custom Calculation.

  3. Provide a name for the field and in the Einstein text entry box, describe the calculation that you want. Provide as much detail as possible to try to get better results.

  4. When your request is ready, click the arrow in the text box to pass it to Einstein.

    Note: If Einstein can’t provide a valid calculation, you can provide feedback.

  5. Evaluate the output to make sure that it’s what you want.

  6. Click Replace Calculation to add the calculation to the editor. You can then edit the calculation and customize if needed. You can also add additional prompts to refine the calculation and then replace the original calculation.

  7. Click Apply to create a field based on the calculation.

  8. Click Save to save the field and close the calculation editor.

Guidelines for Writing Instructions

  • Stick to basic instructions that result in calculation syntax.

  • Use a verb-noun structure.

    • Preferred: Write a calculation to extract the characters from the field…

    • Not preferred: For extracting characters, how can I change the way…

  • Use proper grammar and spelling.

Help Einstein Improve

Einstein is still learning how to build accurate Tableau Prep calculations. Some calculations created by Einstein won’t be written the way you expected. When this happens, your feedback about what’s wrong with the calculation helps Einstein continue to improve and build increasingly accurate calculations.


Example Calculation 1:

Prompt: Write a calculation to find the name of the month for orders in the Order Date field.

Example Calculation 2:

Prompt: Write a calculation to limit the values in the Quantity field by a maximum value of 10.

In this example, an additional prompt is added to refine the calculations to keep values that are above the threshold.

Prompt: If the quantity is above the 10, replace it with the text "Above threshold" and keep the original values.

Thanks for your feedback!Your feedback has been successfully submitted. Thank you!