User Guide Getting Started Help Center Documentation Community Training
Looker
  
English
Français
Deutsch
日本語
Table (Legacy) Chart Parameters for LookML Dashboards

The parameters described on this page can be used with LookML dashboard elements of type: table.

For information about building a table chart through the Looker UI, see the Table Chart Options documentation page.

Example Usage

# BASIC PARAMETERS name: element_name title: 'Element Title' type: looker_table height: N width: N top: N left: N row: N col: N refresh: N (seconds | minutes | hours | days) note: text: 'note text' state: collapsed | expanded display: above | below | hover # QUERY PARAMETERS model: model_name explore: explore_name dimensions: [view_name.field_name, view_name.field_name, …] measures: [view_name.field_name, view_name.field_name, …] sorts: [view_name.field_name asc | desc, view_name.field_name, …] pivots: [view_name.field_name, view_name.field_name, …] limit: N column_limit: N filters: view_name.field_name: 'looker filter expression' # Possibly more filter statements listen: dashboard_filter_name: dimension_or_measure_name # Possibly more listen statements # PLOT PARAMETERS table_theme: editable | white | gray | transparent | unstyled total: true | false row_total: right | left | false show_row_numbers: true | false hide_totals: true | false hide_row_totals: true | false limit_displayed_rows: true | false limit_displayed_rows_values: show_hide: show | hide first_last: first | last num_rows: 'N' # SERIES PARAMETERS truncate_column_names: true | false show_view_names: true | false series_labels: view_name.field_name: desired series label # FORMATTING PARAMETERS enable_conditional_formatting: true | false conditional_formatting_include_totals: true | false conditional_formatting_include_nulls: true | false conditional_formatting: {'desired conditional formatting'}

Parameter Definitions

Parameter Name Description
Basic Parameters
name (for elements) Create an element.
title (for elements) Change the way an element name appears to users.
type (for elements) Determine the type of visualization to be used in the element.
height (for elements) Define the height of an element in units of tile_size for layout: tile and layout: static dashboards.
width (for elements) Define the width of an element in units of tile_size for layout: tile and layout: static dashboards.
top Define the top-to-bottom position of an element in units of tile_size for layout: static dashboards.
left Define the left-to-right position of an element in units of tile_size for layout: static dashboards.
refresh (for elements) Set the interval at which the element will automatically refresh.
note Start a section of LookML to define a note for an element. This parameter has subparameters text, state, and display.
Query Parameters
model Define the model to be used for the element’s query.
explore (for elements) Define the Explore to be used for the element’s query.
dimensions Define the dimensions to be used for the element’s query.
measures Define the measures to be used for the element’s query.
sorts Define the sorts to be used for the element’s query.
pivots Define the dimensions that should be pivoted to be used for the element’s query.
limit Define the row limit to be used for the element’s query.
filters (for elements) Define the filters that cannot be changed for the element’s query.
listen Define the filters that can be changed for the element’s query, if filters (for dashboard) have been created.
Plot Parameters
table_theme Apply one of five table coloring options to a table visualization.
total Specify whether column totals are displayed for a table visualization.
row_total Specify whether row totals are displayed for a table visualization.
show_row_numbers Set whether to show a row number at the beginning of each table row.
hide_totals Set whether a table visualization displays column totals.
hide_row_totals Set whether a table visualization displays row totals.
limit_displayed_rows Show or hide rows in a visualization based on their position in the results.
limit_displayed_rows_values Specify which rows to show or hide in a visualization. Has subparameters show_hide, first_last, and num_rows.
Series Parameters
truncate_column_names Shorten column headers with an ellipsis (…).
show_view_names Show the view name along with the field name for each column header.
series_labels Specify a custom label for each column in the visualization.
Formatting Parameters
enable_conditional_formatting Set to true to define color coding rules for a table visualization.
conditional_formatting_include_totals Specify whether totals are included in the color coding scheme.
conditional_formatting_include_nulls Specify whether null values should be represented as a zero.
conditional_formatting Use conditional_formatting and its subparameters to define the rules that color code your table visualization.

Basic Parameters

When defining a LookML dashboard element, you must specify values for at least the name and type parameters. Other basic parameters like title, height, and width affect the position and appearance and position of an element on a dashboard.

name

This section refers to the name parameter that is part of a dashboard element.

name can also be used as part of a dashboard filter, described on this documentation page.

Each name declaration creates a new dashboard element and assigns it a name. Element names must be unique. Names are sometimes referenced in the elements parameter when using layout: grid dashboards.

- name: orders_by_date

title

This section refers to the title parameter that is part of a dashboard element.

title can also be used as part of a dashboard, described on this documentation page.

title can also be used as part of a dashboard filter, described on this documentation page.

The title parameter allows you to change how an element's name will appear to users. If unspecified, the title defaults to the element name.

Consider this example:

- name: sales_overview title: '1) Sales Overview'

If you did this, instead of the element appearing as Sales Overview, it would appear as 1) Sales Overview.

type

This section refers to the type parameter that is part of a dashboard element.

type can also be used as part of a dashboard filter, described on this documentation page.

type can also be used as part of a join, described on this documentation page.

type can also be used as part of a dimension, described on this documentation page.

type can also be used as part of a measure, described on this documentation page.

The type parameter determines the type of visualization to be used in the element.

- name: element_name type: text | table | single_value | looker_single_record | looker_column | looker_bar | looker_scatter | looker_line | looker_area | looker_pie | looker_donut_multiples | looker_geo_coordinates | looker_geo_choropleth

See the type (for LookML Dashboards) documentation page for an overview of the different types of LookML dashboard elements.

height

This section refers to the height parameter that is part of a dashboard element.

height can also be used as part of a dashboard row, described on this documentation page.

The height parameter defines the height of an element, in units of tile_size for layout: tile and layout: static dashboards.

For example, the code below specifies tile_size: 100 and height: 4, making the orders_by_date element 400 pixels in height.

- dashboard: sales_overview tile_size: 100 ... elements: - name: orders_by_date height: 4 ...

width

This section refers to the width parameter that is part of a dashboard element.

width can also be used as part of a dashboard, described on this documentation page.

The width parameter defines the width of an element, in units of tile_size for layout: tile and layout: static dashboards.

For example, the code below specifies tile_size: 100 and width: 4, making the orders_by_date element 400 pixels in width.

- dashboard: sales_overview tile_size: 100 ... elements: - name: orders_by_date width: 4 ...

top

The top parameter defines the top-to-bottom position of an element in units of tile_size for layout: static dashboards.

For example, the code below specifies tile_size: 100 and top: 4, positioning the top edge of the orders_by_date element 400 pixels from the top of the dashboard.

- dashboard: sales_overview tile_size: 100 ... elements: - name: orders_by_date top: 4 ...

left

The left parameter defines the left-to-right position of an element in units of tile_size for layout: static dashboards.

For example, the code below specifies tile_size: 100 and left: 4, positioning the left edge of the orders_by_date element 400 pixels from the left side of the dashboard.

- dashboard: sales_overview tile_size: 100 ... elements: - name: orders_by_date left: 4 ...

refresh

This section refers to the refresh parameter that is part of a dashboard element.

refresh can also be used as part of a dashboard, described on this documentation page.

The refresh parameter allows an element to reload automatically on some periodic basis, thereby retrieving fresh data. This is often helpful in settings where a dashboard is constantly displayed, such as on an office TV. Note that the dashboard must be open in a browser window for this parameter to have an effect. This setting does not run in the background to "pre-warm" the dashboard cache.

The refresh rate can be any number (without decimals) of seconds, minutes, hours or days. For example:

- name: orders_by_date refresh: 2 hours

Use caution when setting short refresh intervals. If the query behind the element is resource-intensive, certain elements may strain your database more than desired.

note

You can add descriptive notes to elements like this:

- name: element_name note: text: 'note text' state: collapsed | expanded display: above | below | hover

note has the subparameters text, state, and display.

text

The text subparameter specifies the text displayed in the note.

state

The state subparameter determines whether the note will be collapsed or expanded if it is too big to fit on a single row within the element's width. If you choose collapsed, and the note is too long, the note will end in a clickable ellipsis (...) that can be used to read the full note.

display

The display subparameter determines where the note is displayed on an element. above places the note at the top of an element, below places it at the bottom of an element, and hover requires the user to hover their mouse over the element in order to see the note.

Query Parameters

When defining a LookML dashboard element, you must specify values for at least the model and explore query parameters, and at least one field must be specified using either the dimensions parameter or the measures parameter. You can also use the other query parameters described below to control the way data is displayed in a dashboard element.

model

The model parameter defines the model to use for the element query. If unspecified, it will default to the model where the dashboard resides.

- name: orders_by_date model: acme

explore

This section refers to the explore parameter that is part of a dashboard element.

explore can also be used as part of a model, described on this documentation page.

explore can also be used as part of a dashboard filter, described on this documentation page.

The explore parameter defines the Explore to use for the element query.

- name: orders_by_date explore: order

dimensions

The dimensions parameter defines the dimension or dimensions to use for the element query. Use the syntax view_name.dimension_name to specify the dimension. Don't include dimensions if the query has no dimensions.

# single dimension example - name: orders_by_date dimensions: order.order_date # multiple dimension example - name: orders_by_date dimensions: [order.order_date, customer.name]

measures

The measures parameter defines the measure or measures to use for the element query. Use the syntax view_name.measure_name to specify the measure. Don't include measures if the query has no measures.

# single measure example - name: orders_by_date measures: order.count # multiple measure example - name: orders_by_date measures: [order.count, order_item.count]

sorts

The sorts parameter defines the sorts to be used for the element query. The primary sort is listed first, then the secondary sort, and so on. Use the syntax view_name.field_name to specify the dimension or measure. Don't include sorts if you want to use Looker's default sort order. Descending sorts are suffixed with desc; ascending sorts don't need a suffix.

# single sort example - name: orders_by_date sorts: order.order_date desc # multiple sort example - name: orders_by_date sorts: [order.order_date desc, customer.name]

pivots

The pivots parameter defines the dimensions that should be pivoted for the element query. Use the syntax view_name.dimension_name to specify the dimension. Don't include pivots if the query has no pivots.

# single pivot example - name: orders_by_date pivots: customer.gender # multiple pivot example - name: orders_by_date pivots: [customer.gender, customer.age_tier]

limit

The limit parameter defines the row limit that should be used for the element query. The limit applies to the number of rows before any pivots are applied.

- name: orders_by_date limit: 100

filters

This section refers to the filters parameter that is part of a dashboard element.

filters can also be used as part of a dashboard, described on this documentation page.

filters can also be used as part of a measure, described on this documentation page.

The filters parameter defines the non-changeable filters that should be used for the element's query. If you would like filters that a user can change in the dashboard, you should set up the filter using filters for dashboards, then apply it to the element using listen.

The syntax for filters is:

- name: element_name filters: view_name.dimension_name: 'looker filter expression' # You can add more than one filter statement

Looker filter expressions can be found here. You can also use the _localization or _user_attributes Liquid variables in the filter expression for flexible filter values.

listen

Dashboards can have filters that allow users to change the data behind dashboard elements. These are set up by using the filters for dashboards parameter. In order for a filter to impact an element, the element must be set up to "listen" for that filter, using the listen parameter.

The syntax for listen is:

- name: element_name listen: filter_name_goes_here: dimension or measure on which to apply the filter using view_name.field_name syntax # You can add more than one listen statement

For example, you might create a filter called Date that requires a user to enter a date into the filter field in the UI. You could then apply the value that the user enters to the orders_by_date element like this:

- dashboard: sales_overview ... filters: - name: date type: date_filter elements: - name: orders_by_date listen: date: order.order_date ...

This concept is described in more detail on the Building LookML Dashboards documentation page.

Plot Parameters

The below parameters correspond to the options in the Plot section of the visualization editor for table charts.

table_theme

Use the table_theme parameter to apply one of the following table coloring options to a table element:

table_theme: editable | white | gray | transparent | unstyled

total

The total parameter sets whether a totals row is shown at the bottom of the table. See Displaying Totals for more information.

total: true | false # default value: false

row_total

The row_total parameter sets whether a totals column is shown on the right or left of the table. Only works if a pivot is present. See Displaying Totals for more information.

row_total: right | left | false # default value: false

show_row_numbers

The show_row_numbers parameter sets whether a row number will be displayed at the beginning of each table row.

show_row_numbers: true | false

hide_totals

If your Explore includes column totals, hide_totals sets whether the visualization displays the totals.

hide_totals: true | false

hide_row_totals

If your Explore includes row totals, hide_row_totals sets whether the row totals will display in the visualization.

hide_row_totals: true | false

limit_displayed_rows

The limit_displayed_rows parameter lets you show or hide rows in a visualization, based on their position in the results. For example, if your visualization displays a 7-day rolling average, you may want to hide the first 6 rows. Setting this to true allows you to specify the values and positions in the visualization to which this applies using the limit_displays_rows_values parameter and its subparameters.

limit_displayed_rows: true limit_displayed_rows_values: show_hide: hide | show first_last: first | last num_rows: '10'

limit_displayed_rows_values

Use this parameter and its subparameters show_hide, first_last, and num_rows with limit_displayed_rows to specify which rows to show or hide in a visualization. See limit_displayed_rows above for sample usage.

show_hide

The show_hide subparameter sets whether to hide certain rows from the visualization. Set show_hide to show to exclude certain rows from the visualization, and set show_hide to hide to display only a limited number of rows in the visualization.

first_last

The first_last subparameter sets whether the rows to be hidden or shown will be the first or last rows in the result set. Setting first_last to first shows or hides the first rows, while set first_last to last shows or hides the last rows.

num_rows

The num_rows subparameter sets the number of rows to be hidden or shown. For example, num_rows: '10' will show or hide either the first or last 10 rows of the result set from the visualization.

Series Parameters

The below parameters correspond to the options in the Series section of the visualization editor for table charts.

truncate_column_names

The truncate_column_names parameter sets whether column headers should be shortened with ellipses (...).

truncate_column_names: true | false

show_view_names

The show_view_names parameter determines whether view names are displayed in chart labels, such as axis names, column names, and so on.

show_view_names: true | false # default value: true

series_labels

Set the label of the series based on the series name, using name: label pairs.

For a pivoted chart, the series names are the pivot names.

series_labels: 'Yes': iOS Users 'No': Android Users

For a chart with multiple measures, the series names are the measure field names.

series_labels: inventory_items.count: Inventory orders.count: Orders

Formatting Parameters

The below parameters correspond to the options in the Formatting section of the visualization editor for table charts.

enable_conditional_formatting

Setting enable_conditional_formatting to true allows you to define rules that color code your table visualization, either on a scale or by specifying values of interest.

enable_conditional_formatting: true | false

conditional_formatting_include_totals

If enable_conditional_formatting is set to true, conditional_formatting_includes_totals specifies whether totals are included in the color coding scheme.

conditional_formatting_include_totals: true | false

conditional_formatting_include_nulls

If enable_conditional_formatting is set to true, conditional_formatting_includes_nulls specifies whether null values should be represented as zeroes.

conditional_formatting_include_nulls: true | false

conditional_formatting

With enable_conditional_formatting set to true, use the conditional_formatting parameter to define the rules that color code your table visualization. For each conditional formatting rule, you can specify setting with the following parameters:

The following is an example of a conditional formatting rule:

conditional_formatting: [{type: less than, value: 20, background_color: "#9fdee0", font_color: "#b15928", palette: {name: Red to Yellow to Green, colors: ["#F36254", "#FCF758", "#4FBC89"]}, bold: true, italic: false, strikethrough: false, fields: !!null '', color_application: {collection_id: legacy, palette_id: legacy_diverging1}}]

type

The type parameter specifies whether to color code values along a scale or based on a logical condition. If you are color coding values on a scale, you can set type to either low to high or high to low.

type: low to high | high to low

If you are color coding values based on a logical condition, you can specify one of the following values for type, along with a value for value:

type: equal to | not equal to | less than | between | not between | 'null' | not null

value

If you are color coding values based on a logical condition other than 'null' or not null, specify the value to which the rule applies. The value parameter takes a single number or, when type is set to between or not between, a set of two numbers.

value: N | [N, N]

background_color

If your color coding is based on a logical condition (type is set to anything other than low to high or high to low), use the background_color parameter to specify a background color for the values to which your rule applies.

background_color: "#49cec1"

font_color

If your color coding is based on a logical condition (type is set to anything other than low to high or high to low), use the font_color parameter to specify a font color for the values to which your rule applies.

font_color: "#1f3e5a"

color_application

The color_application parameter and its subparameters collection_id and palette_id can be used to apply a specific color collection and palette to a conditional formatting rule.

You can add colors to a LookML dashboard by collection ID and palette ID, if you have them. You can also use the UI to find the colors you want and generate the LookML to add them to your dashboard. Navigate to a piece of user-defined content (like a Look, dashboard, or Explore), and apply the colors you want to that content's visualization using the UI. Once you've done that, you can follow the steps to Get Dashboard LookML, copy the LookML that was produced, and paste it in the color_application section. For an overview of Looker's predefined color collections, see the Color Collections documentation page.

bold

When color coding based on a logical condition, set whether to bold the values to which your rule applies.

bold: true | false

italic

When color coding based on a logical condition, set whether to italicize the values to which your rule applies.

italic: true | false

strikethrough

When color coding based on a logical condition, set whether to apply strikethrough formatting to the values for your rule.

strikethrough: true | false

fields

When color coding based on a logical condition, specify the fields to which your rule should apply. By default, the rule applies to all numeric fields.

fields: [ view_name.field_name ]

Top