Optimize Data for Ask Data
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.
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
- Table calculations in calculated 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.
Data source owners and Tableau administrators can customize suggested questions for a data source, tailoring them to the needs of users in your organization.
- To edit a section title, click the pencil icon to the right of the title.
- To add a question to a section, click the plus sign (+) to the right of the title. Then enter Text to Display and the related query in the Matching Result field.
Tip: Ask Data creates a viz for the matching result when users either click the displayed text or enter it as a query.
- To change an existing question, hover over it and click the pencil icon . To remove a question, click the X.
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.
Simplify the data source
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.
To let users ask questions about data in a conversational style, Ask Data reserves the following words for analytical functions. If any of these words appear as field names in your data, we recommend that you revise them.
Note: In addition to the terms listed below, Ask Data reserves all conjunctions, prepositions, and visualization types such as “Bar chart”.
- distinct count
Filtering and limiting terms
- at least
- at most
- starts with
- ends with
- second over second (sos)
- minute over minute
- hour over hour (hoh)
- day over day (dod)
- week over week (wow)
- month over month (mom)
- quarter over quarter (qoq)
- year over year (yoy)
- most expensive
Use published extracts rather than live data sources
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).
For data source owners and Tableau administrators, Ask Data provides a dashboard that reveals the most popular queries and fields, the number of visualization results that users clicked, and other helpful information. Filters let you narrow data down to specific users and time ranges. These stats help you further optimize the data source to increase the success of your users.
Note: If you use Tableau Server, you can access this data in the Tableau Server Repository to create custom dashboards.
- In Tableau Server or Tableau Online, navigate to a data source, and then click Ask Data at left.
- In the lower-right corner of the browser page, click Usage Analytics.