Optimize Data for Ask Data
Important changes coming for Ask Data and Metrics
Tableau's Ask Data and Metrics features were retired in Tableau Cloud in February 2024 and will be retired in Tableau Server version 2024.2. With advances in natural language technologies, we're developing an improved interface that will make it easier to ask questions of your data and stay on top of changes. For more information, see How Tableau AI and Tableau Pulse are reimagining the data experience.
If you manage and publish data sources, here are some tips to help make users of Ask Data more successful. By spending a little extra time on this process, you'll open up data analysis to a wider range of people at your organization, helping them independently answer questions and gain deeper insights.
Optimize data in Ask Data
In the Data pane on the left of the Ask Data interface, data source owners can add synonyms for fields and exclude irrelevant values.
When changing settings in the Data pane for Ask Data, pay close attention to whether you're at the data source or lens level. (For more information, see Create Lenses that Focus Ask Data for Specific Audiences.)
- At the data source level, you'll see the cylindrical data source icon in the upper left corner. Here, changes you make in the Data pane will apply by default to all subsequently created lenses.
Note: For extracts, two cylinders will appear.
- For an individual lens, you'll see the quotation icon in the upper left corner. Here, changes you make in the Data pane will apply to this lens alone.
People may not use the same terminology found in your data source, so data source owners and Tableau administrators can add synonyms for specific data field names and values. Synonyms you enter are available throughout your organization, making data analysis quicker and easier for everyone.
To improve the usability of search results in Ask Data, you can exclude the values of specific fields from indexing. Though Ask Data doesn't add non-indexed values to search results, the values still appear in visualization results when relevant. For example, if you don't index values from a "Product" field because they add unnecessary detail to search results, Ask Data can still display values such as "iPhone 12" in resulting data visualizations. And users can manually add non-indexed values to queries by surrounding them with quotation marks (for example, "Sales for Product containing "iPhone 12"").
Note: This field-level setting is ignored if the value indexing setting for the data source is set to Disabled. Field names and related synonyms are always indexed.
- Go to the Ask Data tab for a data source or individual lens.
- Hover over a data source field at left, and click the Edit Field Details icon (the pencil).
- Deselect Index field values.
Either click the text box that appears to reindex the data source now, or let it reindex based on its regular indexing schedule.
Optimize data sources
To create the best experience for Ask Data users, optimize the original data source.
Note: Ask Data doesn't support multidimensional cube data sources, or non-relational data sources like Google Analytics, or data sources with a virtual connection.
Data source owners can change how often field values are indexed for Ask Data, optimizing system performance.
At the top of a data source page, click the Details icon:
In the Ask Data section, click Edit.
Choose an indexing option for field values:
Automatic checks for changes every 24 hours and analyzes the data source if it is live, has had an extract refreshed, or has been republished. Choose this option for a data source frequently used with Ask Data, so it will be ready before users query it.
Manual analyzes the data source only when Tableau creators manually trigger indexing on the data source page. Choose this option if the data source changes frequently but users query it with Ask Data only occasionally.
To trigger manual indexing, go to the data source page, click the circled “i” in the Data pane at left, and then click Reindex Data Source.
Disabled analyzes only field names, not values.
Use data extracts for faster performance
For improved performance and support for large data sets, use Ask Data with published extracts rather than live data sources. For more information, see Create an extract(Link opens in a new window).
Ensure that users can access the data source
To use Ask Data, users must have permission to connect to the individual data source. If a data source has row-level permissions, those permissions also apply to Ask Data, which won’t recognize secure values or make related statistical recommendations.
Be aware of unsupported data source features
Ask Data supports all Tableau data source features except the following. If your data source contains these, Ask Data users won't be able to query related fields.
- Combined fields
Anticipate user questions
Anticipate the kinds of questions your users will ask, and then optimize your data source for those questions using these techniques:
- Clean and shape data in Tableau Prep(Link opens in a new window) or a similar tool.
- Join data(Link opens in a new window) to include all fields users may have questions about in one table, improving performance.
- Add calculated fields(Link opens in a new window) that answer common user questions.
- Create bins with appropriate sizes(Link opens in a new window) for quantitative variables that users are likely to want to see as a histogram or another binned form.
Simplify the data
To make data easier to understand by both users and Ask Data, simplify the data source as much as possible during the data prep process.
- Remove any unnecessary fields to improve performance.
- Give each field a unique and meaningful name.
- For example, if there are five field names that start with “Sales …”, better distinguish them so Ask Data can properly interpret the term “sales”.
- Rename “Number of records” to something more meaningful. For example, use “Number of earthquakes” in a data source where each record is an earthquake.
- Avoid field names that are numbers, dates, or boolean (“true” or “false”) values.
- Avoid names which resemble analytical expressions such as “Sales in 2015” or “Average Products Sold”.
- Create meaningful aliases for field values(Link opens in a new window), reflecting terms people would use in conversation.
Set appropriate field defaults
To help Ask Data analyze data correctly, ensure that default field settings reflect the content of each field.
- Set data types(Link opens in a new window) for text, time, date, geographic, and other values.
- Assign the proper data role(Link opens in a new window): dimension or measure, continuous or discrete.
- For each measure, assign appropriate default settings(Link opens in a new window) in Tableau Desktop, such as color, sort order, number format (percentage, currency, etc.), and aggregation function. For example, SUM may be appropriate for “Sales”, but AVERAGE might be a better default for “Test Score”.
Tip: It's particularly helpful to set a default comment for each field, because these comments appear as informative descriptions when users hover over fields in Ask Data.
Create hierarchies for geographic and categorical fields
For time data, Tableau automatically creates hierarchies, which let users quickly drill up and down in vizzes (for example, from day to week to month). For geographic and categorical data, however, we recommend that you create custom hierarchies(Link opens in a new window) to help Ask Data produce visualizations that reflect the relationships between fields. Be aware that Ask Data won't show the hierarchies in the data pane.
Ask Data doesn't index hierarchy names, only names of fields within hierarchies. For example, if a geographic hierarchy named “Location” contains “Country” and “City” fields, users should enter “Country” and “City” in their questions for Ask Data.