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.
Note: Ask Data supports all Tableau data source features except sets, combined fields, and parameters.
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 or a similar tool.
- Join data to include all fields users may have questions about in one table, improving performance.
- Add calculated fields that answer common user questions.
- Create bins with appropriate sizes for quantitative variables that users are likely to want to see as a histogram or another binned form.
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.
Note: You can't use synonyms that reflect standard analytical terms like “by” or “max”. Likewise, you can't create synonyms for these special types of data: sets, bins, clusters, hierarchies, combined fields, table calculations, or latitude and longitude.
- In Ask Data, hover over a data source field at left, and click the Edit Field Details icon (a pencil).
- To enter synonyms for the field name, use the Synonyms text box.
- To enter synonyms for field values, click the arrow in the lower left corner.
Then use the search box to find specific values, and enter synonyms for them at right.
Tip: To help Ask Data better interpret users' questions, make synonyms for field values unique and short.
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 or hide any unnecessary fields.
- 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, 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 for text, time, date, geographic, and other values.
- Assign the proper data role: dimension or measure, continuous or discrete.
- For each measure, assign appropriate default settings 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 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
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.