Using Ask Me

Ask Me is used to take questions submitted by a user, query data within Sisense, and return an understandable, friendly response. Using natural language makes asking questions of data more approachable to less technical business users. Ask Me is best used to perform small, ad-hoc queries, as opposed to deep or complex data analysis. Ask Me queries are not case sensitive. You can enter your own jargon, such as 'show me', but Viewpoint names, column names, and literal values must be spelled correctly.

Note:

The Ask Me for Infusion Apps is not the same as the NLQ used by Simply Ask in a Sisense dashboard.

Using Ask Me in Infusion Apps

Ask Me can be used in any Infusion App:

Infusion App Input Output
Slack Chatbot Responses to questions are returned in a list format, but can be viewed as a visualization when aggregated. The data displayed in the list output corresponds to how the columns are configured within the Viewpoint.
Teams
Office 365 Excel Text box Responses to questions are returned in a raw, tabular format. The data displayed in the output corresponds to how the columns are configured within the Viewpoint. Users can preview the result.
Google Sheets
Google Slides Responses to questions are returned in either a table, chart or summary as indicated by the user. Users can preview the result.

Getting Started

You should start by understanding which Viewpoints are available to you, in order to know what kinds of questions you can ask.

Enter the command in Slack/Teams to display a list of Viewpoints and their descriptions.

Each query requires you to reference a Viewpoint. An NLQ can only be based on a Viewpoint (as opposed to a data model). Before you query data, you must browse through the list of Viewpoints available to you to ensure that the information you want is encompassed by at least one of those Viewpoints.

In Slack or Teams, Viewpoints can be shown using the command/word show Views, which displays a list of Views and their descriptions. The columns and filters displayed in the response can help you understand what data is included in the Viewpoint, about which you can ask questions, and how to ask your questions.

In Office 365 or Google, Viewpoints can be shown by expanding the Views section - a list of Views and their descriptions appear.

Writing Queries

Ask Me requires that you follow some syntactical rules when asking questions.

Filtering

Each Viewpoint will have one or more filter fields enabled for filtering. Fields may be pre-filtered in the Viewpoint itself; these can be overridden by explicitly specifying filters in the query. You cannot filter by a field which is not exposed in the Viewpoint as a filter.

Using Operators

Text, Literal Dates, and Numerics can be filtered using operators:

Value Format Example:
Equals or Between =

close date = '2020-10-01 to 2020-12-31' (between Oct 01, 2020 and Dec 31, 2020)

close date = ALL

Greater Than > close date > '2019-07-22' (date after July 22, 2019)
amount > 100000
Greater Than or Equal To >= close date >= '2019-07-22' (date on or after July 22, 2019)
amount >= 50000
Less Than < close date < '2019-07-22' (date before July 22, 2019)
amount < 100k
Less Than or Equal To <= amount <= 10m
Not Equal To <> amount <> 100000
Not Equal To != amount != 100000

Filtering Text Fields

You can filter on a text field by referencing a <column name> and <operator> and one or more <values>. All <values> must be contained by single quotes.

Exact Match

Text fields can be filtered by exact text using the equals operator.

Format

Example

Translation

<column name> equals '<literal value>'

sales rep = 'john smith'

Returns any results where the Sales Rep field contains the value John Smith

Partial Match (Contains)

Text fields can be filtered by partial text using the (contains|has|includes) operators.

Format

Example

Translation

<column name> contains '<literal value>'

sales rep contains 'john'

Returns any results where the Sales Rep field contains the value John

Logical OR Filters

You can specify multiple values filtered as logical OR using the comma as a separator.

Note:

Do not leave spaces between the comma separators. The spaces will be included in the search.

Format

Example

Translation

<column name> operator '<literal value 1>,<literal value 2>,<literal value N>'

sales rep = 'john smith’, ‘oscar rios’, ‘matt johnson’

Returns any results where the Sales Rep field contains the value John Smith, Oscar Rios, or Matt Johnson.

Logical AND Filters

You can specify multiple values filtered as logical AND using the + separator.

Note:

Do not leave spaces between the + separators. The spaces will be included in the search.

Format

Example

Translation

<column name> operator '<literal value 1>+<literal value 2>+<literal value N>'

description contains 'health+insurance'

Returns any results where the Description field contains the values Health and Insurance.

Filtering Numeric Fields

You can filter a numeric field using supported operators including standard arithmetic operators. Numeric notations for K (thousand), M (million), and B (billion) are supported.

Do not include currency symbols or comma notations when specifying numeric values.

Filtering Date Fields

You can define a date range within your query to narrow down the result set. These ranges can be defined as a literal or dynamic time window. To filter on a specific date range, include the specified range immediately after the Viewpoint name.

The basic syntax for referencing a date field is:

<column name> = 'range or literal'

Dynamic Date

Queries with a dynamic date do not require a manual filter each time new data is available. Result sets will change relative to the dynamic date. You do not need to use an operator when defining a dynamic date.

Supported Date Elements:

  • Year

  • Quarter

  • Month

  • Day

Supported Range Components:

  • This

  • Last

  • Next

  • Is Before

  • Is After

Literal Date

A literal date is a fixed expression that represents an individual day/month/quarter/year or a range of time. Multiple dates can be filtered with a comma-separated list of dates.

Value Format Example:
Individual Days

yyyy-MM-dd

MM/dd/yyyy

close date = '2020-10-01'

Order Date = '07/27/2022'

Date Range <column name> = 'date1 to date2' Order Date = '02/21/2022 to 05/05/2022'
Months MMM yyyy close date = 'Feb 2020'
Quarters

Q yyyy

yyyy Q

Order Date = 'Q3 2019'

Order Date = '2020 Q1,2020 Q2'

Years yyyy

Order Date = '2020'

close date = '2019,2020'

Default Date Reference

In order to enhance the natural language experience it is possible to simply add the date filter condition immediately after the Viewpoint name itself. This will effectively filter the date field flagged as the default date.

Default date filtering is performed using the following syntax:

  • <Viewpoint name> <date range>
  • <Viewpoint name> in <date literal>

Availability of Data

Data coming from an ElastiCube refreshes based on the build schedule of the cube. Data coming from a Live model refreshes with new data each time the user queries a Viewpoint.

This means that depending on the build schedule, or how often the data in your live model changes, and how often you query data, you may not see the changes in the data that you expect.

If you expect to see changes in the data, but are not seeing them, contact your Sisense Administrator.

Saving Questions for Repeated Use

In some cases, users may ask similar, or even the same, questions repeatedly. A query can be saved as a Bookmark and referenced at any time by entering the command show <bookmark name>. All Bookmarks can be viewed by typing show bookmarks. Bookmarks are saved for each user, but questions can be shared and then bookmarked by others.

See Using Bookmarks for more information about creating and managing Bookmarks.

Exploring Aggregated Data

Using the Analyze Command

Viewpoints, Bookmarks, and Questions can be aggregated in order to see results in a different way. Using the Analyze function provides a summary and a visualization of the data. Aggregation can be performed by asking a question and clicking Analyze or by prepending a question with the command analyze <Viewpoint name> or <Bookmark name>.

When you perform this command, the bot summarizes metrics and provides a Top 10 breakdown of the different dimensions. The analysis performed is based on the following metrics:

  • The Distinct Count of the Unique Identifier as specified in the Viewpoint.
    • Past Period and YoY Differential if there is a date filter defined in the query.
  • Aggregation of the Default measure as specified in the Viewpoint.
    • Range of Min and Max.
    • Past Period and YoY Differential if there is a date filter defined in the query.
  • Aggregation of all other measures.

In order for the Summary to return accurate results, Analyze requires the definition of a Unique Identifier and a Default Measure when creating the Viewpoint. Viewpoint Creators can add additional configurations such as aggregations and date filters in order to enrich the results. To ensure the Analyze and Summary feature works properly for users, see Data, Format, and Filters.

Note:

Analyze is only supported for Slack and Microsoft Teams.

Visualizations

Accompanying the Summary, Visualizations are generated and displayed natively in Slack. Visualizations are interactive and enable you to dynamically change the measures and dimensions displayed on the X and Y axes.

 

Definition

Example

Measure

A field that contains quantitative values that you can measure

Numeric data

Dimension

A field that contains qualitative values

Names, Dates, or Geographic data

The chart provides the top 10 results, broken down based on the selections in the drop-downs. You can select a measure or dimension other than that which was originally shown. The options displayed in the drop-downs are determined by the Viewpoint’s configuration.

Depending on the dimensions selected, the visualization is displayed as a bar chart or a time series chart.