NOTE: All the example Questions in this page use this Example Dataset.
Keywords for Grouping
In the previous section, we have listed different Types of Measures. All of those measures can be grouped by Dimensions. Use one of these Keywords to group Data by a Dimension:
The various types of Dimensions are described below:
Grouping by Fields
You can group Measures by Text/Geo-Location Fields as shown below:
You can also group Measures by Number or Date Fields in the same manner, but they are not usually needed.
In general, you'll group by Date Fields using Time Periods as explained below:
Grouping by Time Periods
Basic Time Periods
You can use the following Time Periods when grouping your data:
YEARS: e.g. 2018, 2017, …
QUARTERS: e.g. Jan-Mar 2018, Apr-Jun 2018, ...
MONTHS: e.g. Jan 2018, Feb 2018, ...
WEEKS: e.g. 01 Jan 2018 - 07 Jan 2018, … The start of the week can be configured in the Data-Model
DAYS: e.g. 01 Jan 2018, 02 Jan 2018, ...
HOURS: e.g. 01 Jan 2010 00:00 - 00:59
Calendar-based Time Periods
You can also use these Calendar-based Time Periods for grouping:
QUARTERS OF YEAR: e.g. Jan-Mar, Apr-Jun, Jul-Sep, Oct-Dec
MONTHS OF YEAR: e.g. Jan, Feb, Mar, …, Dec
DAYS OF YEAR: e.g. 01 Jan, 02 Jan, …, 31 Dec
DAYS OF MONTH: e.g. 01, 02, …, 31
DAYS OF WEEK: e.g. Sun, Mon, …, Sat
HOURS OF DAY: e.g. 01, 02, …, 23
ACROSS MONTHS OF YEAR
BY DAYS OF WEEK
Financial Time Periods
You can also group using Time Periods based on your Financial year (FY). The start of the Financial-year can be configured in the Data-Model. Here are the various FY-based Time Periods:
FINANCIAL YEARS (FY): If your FY starts in January, these will have values like: FY 2017, FY 2018, … If your FY starts in any other month, these will have values like: FY 2016-17, FY 2017-18, ...
FINANCIAL QUARTERS (FQ): e.g. Apr-Jun 2018, Jul-Sep 2018, ...
ACROSS FINANCIAL YEARS(You can simply use
BY FINANCIAL QUARTERS(You can simlpy use
Grouping by a List of Values
You can also group Measures by specific values of a Dimension. This works for all the above Dimensions.
ACROSS NEW YORK CITY, LOS ANGELES
IN 2014, 2015
IN JANUARY, MARCH, MAY
ACROSS FY 2015, FY 2016
Please note that you'll have to use at least 2 values for the grouping to work. If you use just a single value, it'll be considered as a Filter.
Also note that all the values must be from the same Dimension.
Grouping by Functions
You can also use various Functions as Dimensions. See Using Functions for a list of supported Functions and how to use them.
You can use multiple Dimensions in the same Question using Commas,
AND or the Grouping Keywords in between.
IN CITIES, FY
ACROSS MONTHS AND YEARS
IN 2015, 2016 ACROSS MONTHS OF YEAR
The resultant chart is called a Drill-down Chart because you can drill down from one Dimension to another. The order of Dimensions in the Question will determine the order of Drill-down in the chart. You can see Drill-down in action below: