Automatically Build Views with Ask Data
Ask Data lets you type a question in common language and instantly get a response right in Tableau. Answers come in the form of automatic data visualisations, with no need to manually drag and drop fields or understand the nuances of your data’s structure.
Ask Data lets you ask sophisticated questions naturally, with support for key analytical concepts like time series and spatial analysis, and an understanding of conversational phrases like “last year”, “earliest” and “most popular”.
Before you can query a data source with Ask Data, a Tableau author must first create a lens(Link opens in a new window) that specifies the subset of data fields the lens uses.
In Tableau, here are all the places where you can access an Ask Data lens:
- On the All Lenses page at the top level of your Tableau Online or Tableau Server site.
- On the Ask Data tab for a data source for which lenses have been created.
- In an Ask Data object on a dashboard.
- Navigate to a lens via the All Lenses page for your Tableau site, the Ask Data tab for a data source, or an Ask Data object on a dashboard.
- (Optional) Under Recommended Visualisations, click an entry to quickly see visualisations the lens author has created for your organisation.
If a recommendation addresses your data analysis needs, you can stop here. Otherwise, continue on to quickly create your own question.
- (Optional) In the Data pane at left, briefly hover over each field to learn more about the data it contains.
In a narrower dashboard object, the Data pane may be hidden, but you can see the same information by clicking the Fields drop-down menu.
- In the box reading “Search fields or values to create a visualisation”, enter your query about the data.
- As you type, Ask Data searches data fields, functions and string values and displays results in a drop-down list. Click items in the list to add them to your current entry, shown above the search box. To automatically create a viz using the current entry, press Enter at any time.
Tip: To refine your query, remove items in grey, which aren't used in the current interpretation. Hover over remaining elements in the text box to highlight them in the interpretation above and see how they're incorporated.
Rephrase your question
You can rephrase questions by clicking options, data fields and filters in the user interface.
If the default viz doesn't fully reveal your data, click the menu at upper right, and choose from these supported viz types:
- Bar Chart
- Gantt Bar
- Heat Map
- Line Chart
- Pie Chart
- Stacked Bar Chart
- Text Table
Note: To automatically create certain viz types, Ask Data sometimes adds fields like “Number of Records” to your entries.
Ask Data gives you several ways to fine-tune how field values are displayed.
- To switch the fields used for the vertical and horizontal axes, click the Swap Axes button to the left of the viz selection menu:
- To change a field or its aggregation or grouping type (for example, from sum to average), click the field name in the text box.
- For categorical filters, click values (like "exclude United States" in the example below) to change specific values or enter wildcard parameters.
- To adjust a numeric range, click words like “high”, “between” or “cheap”.
To delete a field or filter, hover over it and click the X.
To adjust a date filter, click words like “in”, “last”, “previous” or “between”. Then click one of the following:
- Specific Dates to enter a specific time period or date value
- Relative Dates to show a date range relative to the present day
- Range of Dates to enter specific start and end points
Specific Dates offers some unique options in the Date Detail menu:
- Time Period options show a single continuous date range
- Date Value options show ranges that can repeat in multiple time periods. For example, to see combined sales performance for Q1 across multiple years, under Date Value, you would choose Quarters.
Ask Data lets you compare time periods with phrases like “year over year”, “quarter over quarter” or similar comparisons by month, week or day. The results appear as difference or percent difference table calculations in workbooks you save from Ask Data.
In the text box, click a difference calculation to choose other fields, aggregation methods and time periods.
Ask Data supports simple calculations between two measures, which you can apply using these symbols:
+ sums the measures
- produces the difference between them
In workbooks you save from Ask Data, these calculations don't become calculated fields but instead ad hoc calculations on the Columns, Rows or Marks shelves.
To quickly create multiple different vizzes from a lens, add sheets in Ask Data.
At the bottom of the web page, do any of the following:
- Click the Add Sheet icon to the right of named sheets.
- Right-click a sheet name, and choose either Duplicate or Delete.
(To rename sheets from Ask Data, you need to save them in a new workbook.)
You can quickly share Ask Data vizzes. Simply click the link icon above the query box, and copy a link viewable by anyone with access to the lens.
Tips for success
As you structure questions for Ask Data, apply these tips to get better results.
Use keywords – For example, instead of “I want to see all the countries that these airports are in”, try “by airport and country”.
Use exact wording for field names and values – For example, if your lens includes Airport Code, Airport Name, and Airport Region fields, specify those by name.
See a ranked list – Ask Data maps terms like “best” and “worst” to Top 1 and Bottom 1, respectively. If you want to see broader rankings, use “high” and “low” instead. For example, enter “houses with low sale prices”.
Surround unusually long values with quotation marks – To analyse long field values that contain line returns, tabs, more than five words or more than 50 characters, surround them with quotation marks. To improve performance, Ask Data doesn't index fields of that length.