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 visualizations, 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.

Ask Data from a lens page or dashboard object

  1. 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.
  2. (Optional) Under Recommended Visualizations, click an entry to quickly see visualizations the lens author has created for your organization.

    If a recommendation addresses your data analysis needs, you can stop here. Otherwise, continue on to quickly create your own question.

  3. (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.

  4. In the box reading “Search fields or values to create a visualization”, enter your query about the data.

  5. 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.

    Modifying a query by searching for fields and analytical functions

    A. Current entry B. Current filters C. Search box D. Returned fields E. Returned analytical functions F. Returned field values

    Tip: Hover over elements in the text box to see how they're incorporated in the interpretation above. Words that aren't used are grayed out, helping you rephrase your query in a way that’s clearer to Ask Data.

Rephrase your question

You can rephrase questions by clicking options, data fields, and filters in the user interface.

Change the viz type

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
  • Histogram
  • Line Chart
  • Map
  • Pie Chart
  • Scatter
  • Stacked Bar Chart
  • Text Table
  • Treemap

Note: To automatically create certain viz types, Ask Data sometimes adds fields like “Number of Records” to your entries.

Change fields, filters, and displayed data

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.

Adjust date filters

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.

Compare differences over time

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.

Apply simple calculations

Ask Data supports simple calculations between two measures, which you can apply using these symbols:

+ sums the measures

- produces the difference between them

* multiplies

/ divides

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. For more information, see Ad-Hoc Calculations.

Add sheets with other vizzes

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.

Send feedback to the lens owner

If you have questions about the structure of a lens or how best to use it with Ask Data, you can send feedback directly to the author. (This option is enabled by default, but lens authors may disable it.)

1. To the left of the query box for Ask Data, click the "Ask Data tips" icon.

3. At the bottom of the tips dialog, click Contact the Lens Author.

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 analyze long field values that contain line returns, tabs, more than five words, or more than 200,000 characters, surround them with quotation marks. To improve performance, Ask Data doesn't index fields of that length.

Thanks for your feedback!