Explore Predictions in Tableau with the Einstein Discovery Dashboard Extension
Use the Einstein Discovery dashboard extension to surface real-time predictions in Tableau. The dashboard extension generates predictions interactively, on-demand, using an Einstein Discovery predictive model on source data in your Tableau workbook.
Dashboard authors can configure the dashboard extension to run predictions on aggregated data in a worksheet, as demonstrated in the image above, or use parameters to let dashboard users explore "what-if" scenarios based on a single set of input values.
For information on how to add the Einstein Discovery dashboard extension, see Add and configure the Einstein Discovery dashboard extension in this topic. Also see Requirements for access.
For more information about Einstein Discovery, see Getting Started with Discovery(Link opens in a new window), and Explain, Predict and Take Action with Einstein Discovery(Link opens in a new window) in Salesforce help. You can also expand your knowledge with the Gain Insight with Einstein Discovery(Link opens in a new window) trail in Trailhead(Link opens in a new window).
Note: Einstein Discovery in Tableau is powered by salesforce.com(Link opens in a new window). Consult your agreement with salesforce.com(Link opens in a new window) for applicable terms.
Use the Einstein Discovery dashboard extension
To explore predictions in a dashboard that uses the Einstein Discovery dashboard extension, select different marks or parameter values in the view. Predictions update based on the data in your selection.
You might need to sign into the Salesforce org account that has access to the prediction definition used by the dashboard extension.
In Tableau Desktop, you will need to sign in to your Salesforce account every time you use the Einstein Discovery dashboard extension. If Salesforce signs you out of your session automatically, you may need to reload the dashboard extension (click the drop-down arrow on the Extension object and then select Reload).
In Tableau Cloud and Tableau Server, you should need to sign in only once if your credentials are being saved with your Tableau account settings.
For related information, see Use Dashboard Extensions(Link opens in a new window) in Tableau help and Explain, Predict and Take Action with Einstein Discovery(Link opens in a new window) in Salesforce help.
How to read Einstein Discovery predictions
The dashboard extension has three sections:
- Prediction – The predicted outcome
- Top Predictors: Conditions that affect the predicted outcome
- How To Improve This: Suggested actions to take to improve the predicted outcome
Section | Description | Example |
---|---|---|
Prediction The prediction reflects the goal of the use case. | The goal is to either maximise or minimise the outcome. For example, your goal can be to minimise shipping time or to maximise the average sales revenue per shipment. | |
Top Predictors Conditions that most significantly affect the predicted outcome, in decreasing order of magnitude. | A condition is a data value associated with a field. A predictor consists of one or two conditions. If two conditions are shown, they are joined by and to represent the intersection of those conditions. Green (arrow up) indicates that the predictor improves the predicted outcome. Red (arrow down) indicates that the predictor worsens the predicted outcome. | |
How To Improve This Suggested actions the user can take to improve the predicted outcome. | Improvements are associated with factors over which users can possibly control, such as the shipping method or a subscriber’s membership level. |
Add and configure the Einstein Discovery dashboard extension
To configure and use the Einstein Discovery dashboard extension in Tableau, you will need:
- Access to a Salesforce org and Tableau Desktop, Tableau Server or Tableau Cloud.
- An Einstein Discovery prediction definition that is deployed in Salesforce.
- Source data in Tableau with fields that match the model fields required by the Einstein Discovery prediction definition.
- A worksheet in Tableau that contains the source data for the prediction.
- Additional worksheets that can be used as filters in the dashboard.
- The Einstein Discovery dashboard extension in a dashboard.
To configure and use Einstein Discovery predictions in Tableau, you and anyone who will be viewing predictions in a Tableau workbook will need certain licences, access and permissions in Salesforce and Tableau. For more information, see Requirements for access.
Prepare the model and the workbook
- Build and deploy the Einstein Discovery prediction definition that you want to use. You can also use a prediction definition that someone else has built and deployed. For more information, see Build, Deploy and Manage Models(Link opens in a new window) in Salesforce help.
- Create a Tableau workbook that uses a data source with fields that can be mapped to all model fields required by the Einstein Discovery prediction definition.
- Create a worksheet that contains the source data for the dashboard extension.
This source data must include all of the fields required by the Einstein Discovery prediction definition to predict an outcome. Also, the source data must match the granularity that the Einstein Discovery prediction definition expects. For example, if the prediction definition expects sales per individual order, then your Tableau data must include fields at the level of detail of individual orders.- Worksheets support predictions for multiple rows of data (bulk predictions). The worksheet can contain the necessary fields in the Rows or Columns shelves, or on Marks card properties. The worksheet will not be visible in the dashboard; a simple view will suffice. For example, you could create a text table.
Or a basic bar chart.
The worksheet used as source data for the model cannot exceed 50,000 rows of data. Fields in the view can't be Measure Names or Measure Values. - Parameters support single-row predictions. To set up the worksheet, show the parameters in the view. You don't need to add fields to the view for this worksheet. For example:
- Worksheets support predictions for multiple rows of data (bulk predictions). The worksheet can contain the necessary fields in the Rows or Columns shelves, or on Marks card properties. The worksheet will not be visible in the dashboard; a simple view will suffice. For example, you could create a text table.
Create one or more worksheets with visualisations that you can set to Use as Filter in the dashboard.
The visualisation can use a subset of the fields used by the model. Clicking marks in these views in the dashboard will refresh the predictions in the dashboard extension.Create the dashboard. In the Objects section, click Floating. From the Sheets section, drag the source data worksheet to the canvas. Resize and hide that sheet so users won't see it in the dashboard. Also drag one or more sheets to the canvas to serve as filters in the dashboard.
In the Sheet object menu, set at least one worksheet with a visualisation to Use as Filter.
Configure the extension
- From the Objects section, select Floating and then drag the Extension object to the dashboard canvas. In the Tableau Exchange, select Einstein Discovery.
Sign in to your Salesforce account. After you sign in, a web page opens asking if you want to allow your Salesforce account to access Tableau. Click Allow to continue, and then close the resulting tab in your browser.
On Tableau Desktop, you will need to sign in to your Salesforce account every time you use the Einstein Discovery dashboard extension. If Salesforce signs you out of your session automatically, you may need to reload the dashboard extension (click the drop-down arrow on the Extension object and then select Reload). This time-out setting is configurable. For more information, see Edit Session Settings in Profiles(Link opens in a new window) in Salesforce help.
In Tableau Cloud and Tableau Server, you should need to sign in only once if your credentials are being saved with your Tableau account settings. - Configure the dashboard extension.
For Prediction Definition, click Search Predictions and then select the name of a prediction model deployed in Salesforce.
Select Worksheet or Parameters to be the source data for the predictions. Worksheet provides predictions based on a selected mark with aggregated values. Parameters supports interactive, “what if” predictive analysis on a single set of input values.
For Worksheet, click Select an Option, and then select the name of the worksheet with the source data. For Parameters, no other setting is needed.
Click Proceed. - Map the fields from the model to the fields in the worksheet. The extension will automatically map fields based on names when possible.
To add or change mappings, click in the search box next to a prediction field and select a name from the list of available worksheet fields or parameters.
You must map all of the fields to continue to the next set of configuration settings. If you don't see a matching field listed, try these troubleshooting steps.
Click Next to continue. - Select options for how predictions are displayed.
Prediction Label: Click the field and type a label that represents the outcome that you are predicting, for example, Likelihood of On Time Delivery. The deployed model name is displayed by default.
Prediction Score Unit: Type a symbol or text that indicates the unit for the prediction score. For example, %. If the unit should be displayed before the score, select Unit precedes score. For example, a currency symbol (such as $) would precede a currency amount.
Aggregation: Specify how you want to aggregate the selected records (Average, Median or Sum) in the source data worksheet. Tableau aggregates your selected data into a single set of values, which it submits to the Einstein Discovery prediction definition as input. The granularity must match the granularity expected for the model.
Top predictors: Specify whether to display top predictors that impact the prediction. You can also specify the number of top predictors displayed, and whether the impact values are displayed next to each predictor.
Top improvements: Specify whether to display information on ways to improve the probability of the predicted outcome. You can also specify the number of improvements displayed, and whether the impact values are displayed next to each improvement. For Improvement threshold percentage, specify a percentage number (0-99) to display improvements only if they improve the prediction by that percentage.
Show prediction warnings: Specify whether to show warnings about the predictive model, such as missing values in required fields or out-of-bounds values.
Consider showing everything to start with and then fine tuning what you end up sharing with your dashboard audience. - Click Done. Tableau submits the data immediately to the target Einstein Discovery prediction definition, and then displays the result.
In the dashboard, make sure at least one worksheet is set to Use as Filter. Every worksheet in the dashboard that is set to Use as Filter will drive the extension to update the predictions based on the current selection.
Test your dashboard by clicking and selecting different marks and areas in the dashboard (or by selecting different parameter values) to see what outcome Einstein Discovery predicts for that subset of the data.
Save the workbook in Tableau Cloud or Tableau Server. Or, publish the dashboard from Tableau Desktop to your Tableau Cloud or Tableau Server site to share it with more people. Explorers and Viewers with access to the same Salesforce org and an Einstein Discovery in Tableau licence, a Tableau CRM Plus licence, or an Einstein Predictions licence will be able to use the extension.
Troubleshoot field mapping
If a field you are expecting to use is not in the list of available fields, you might need to check the data type for the field in Tableau.
Einstein Discovery and Tableau do not always recognise dimensions, measures and data types in the same way, so you might have to change the data type and role (dimension or measure) in the Data pane of the worksheet to match how Einstein Discovery interprets the field.
- Close the Extension: Einstein Discovery window.
- Go to the source data worksheet. In the Data pane, change the data type and role of a problematic field in Tableau to match the Einstein Discovery field data type and role in the mapping settings. After you change the data type or role, you will need to replace incorrect fields in the view with the updated fields from the Data pane.
- In the dashboard, click the drop-down menu for the extension, and then select Configure. Proceed to the field mapping settings and select the fields from the list.
- If you still don't see the fields you expect in the list, go back to the source data worksheet. Remove the fields that are missing for mapping from the Marks card, or the Rows, or Columns shelves.
Next, drag the missing fields from the Data pane to Tooltip on the Marks card. - Repeat Step 3 to select the fields for mapping.