Table

A table displays data in tabular form, where the header row defines the field names, and all the rest display their values.

A table stores data as a two-dimensional array that consists of columns and rows. Column headers show dimension or measure's names, while cells contain their values. Each row is a set of cells with a value for each column.

A table may also contain a row with results.

Tables are a great tool for detailed analysis of figures and problem detection. However, it takes longer to understand the information from a table at a glance than from a graphics-based chart.

table_chart

A table is a good choice for quantitative comparison, where you can see different values of multiple categories or dimensions.

AI-Insights supported

Use the AI-Insights feature with this chart type.

  1. Open the All workbooks overview page and select your workbook.

  2. Click CreateWizard chart. You'll see the chart creation wizard.

  3. On the top left, select the Dataset you want to visualize.

  4. Click the chart type field on the right of the dataset section and select Table from the drop-down menu.

  5. Drag and drop Measures and Dimensions to the appropriate sections of the chart (see the Data fields tab).

    Your chart creation wizard should look similar to the following:

    table_chart-wizard

  6. Click Save in the upper-right corner of the page.

  7. Name your chart and click Done.

  8. Choose the appropriate location for your chart by dragging it around the dashboard and resize it by dragging the lower-right corner of its frame.

  9. Click Save in the upper-right corner of the page.

Note

This configuration is a segment in the overall description of Visualization assets in the workbook. For the complete tutorial, see Use Visualization API.

To describe a table chart, use the FlatTable configuration:

  • name - your chart's name. Must be unique within the workbook.

  • dataset - the ID of the dataset whose data to visualize.

  • ad_hoc_fields - (optional) describe the calculated fields to use in the chart:

    • title: the field's title.

    • id - the ID of the calculated field. Must be unique within the dataset.

    • cast - the field's Visualization-specific data type

    • description - (optional) the field's description in plain text format.

    • hidden - (optional) if true, doesn't the field in the dataset's field list. If unspecified, defaults to false.

    • aggregation - applies aggregation to the field.

    • calc_spec - defines the data field specification.

  • visualization - describe the configuration of your chart:

    • kind: flat_table - specify the chart type.

    • columns - configure the data reference for the columns. You can define multiple data sources as follows:

      • source - specify the data source:

        • kind: ref - take the data from the reference data source. This is the dataset specified above.

        • id - specify the ID of the data field from the dataset whose data will be used to visualize the Y axis.

    • sort - specify the data field to be used as a sorting reference:

      • source - specify the data source:

        • kind: ref - take the data from the reference data source. This is the dataset specified above.

        • id - specify the ID of the data field from the dataset whose data to use as sorting reference.

      • direction - configure the sorting direction to apply to the chart. You can assign ASC for ascending or DESC for descending.

    • coloring (optional):

      • kind - specify which data type field to use as a color filter. You can specify a dimension or measure.

      • source - specify the data source:

        • kind: ref - take the data from the reference data source. This is the dataset specified above.

        • id - specify the ID of the data field from the dataset whose data will be used as a color filter.

      • palette_id - select the palette to apply to the chart. For most cases, use default-palette.

      • mounts - assign colors from the palette to data points from the source:

        • value - specify the exact value from the source.

        • color_idx - match the above value to a color swatch number in the palette.

API example
- name: ch_flat_table_sales_per_subcategory_per_segment
chart:
   datasets:
   - ds_sales
   ad_hoc_fields: []
   visualization:
      kind: flat_table
      columns:
      - source:
         kind: ref
         id: sub_category
      - source:
         kind: ref
         id: segment
      - source:
         kind: ref
         id: sum_sales
      sort:
      - source:
         kind: ref
         id: sum_sales
      direction: DESC
      coloring: null
Wizard slot Description
Columns Dimensions or Measures as columns. Field name creates the column heading.
Colors Dimension or Measure. Affects the fill color of all the cells in a row.
Sorting Dimensions or Measures from the Columns slot. Multiple-field slot. The sequence of fields Affects the sorting of the table fields.
Chart filters Dimension or Measure. Used to filter values.

To open field settings, click the field type icon before the field name:

  • for Integer type fields:

    Name

    Description

    Possible values

    Name

    Sets the name of the measure

    A string of characters.

    Type

    Sets the field's data type.

    Integer, Fractional number, String, Logical, Date, Date and time

    Aggregation

    Sets the aggregation type

    Not editable for this data type.

    Format

    Sets the value display format

    Number: display the values as plain numbers. Percent: show the values as a percentage.

    Show delimiter

    Toggles the separation of groups of thousands.

    Show: display spaces between groups of thousands. Hide: hide spaces between groups of thousands.

    Prefix

    Sets a text to display before the value

    A string of characters.

    Postfix

    Sets a text to display after the value.

    A string of characters.

    Units

    Sets a rounding scale to apply to the field's values.

    Null: don't apply rounding. Auto: select and apply a rounding scale automatically. Thousands, K: round to thousands, display 000 as K. Millions, M: round to millions, display 000 000 as M. Billions, B: round to billions, display 000 000 000 as B. Trillions, T: round to trillions, display 000 000 000 000 as T.

    Linear indicator

    Toggles a linear indicator display to represent your data in a graphical form. Please note: the Column fill color overrides this setting.

    On: displays linear indicators in the column. Off: hides linear indicators in the column.

    Fill type

    Selects a color fill type for linear indicators.

    One color: displays linear indicators filled with a single color:

    • Color swatch: displays a pop-up to select a pallette and choose one of the predefined colors from it.
    • Input field: allows you to specify an HTML color code .

    Two colors: displays linear indicators filled with a single color, but colors for positive and negative values are different. The controls are similar as for One color, but these ones are different for the positive and negative values.

    Gradient: displays linear indicators filled with a gradient. This control displays a dialog window:

    • Gradient type toggles between gradients based on 2 or 3 colors.
    • Drop-down menu selects the gradient color palette. The preview is displayed to the left.
    • The button changes the gradient's direction.
    • Set threshold values allows you to specify threshold values manually, each value will correspond to a color.

    Show labels

    Display values on top of linear indicators.

    On: show values. Off: hide values.

    Align

    Toggles the indicator's starting side. Please note: this setting works only if all the values in the column are either positive or negative.

    Default: the indicator's zero side is selected automatically. Left: the indicator's zero side is on the left. Right: the indicator's zero side is on the right.

    Scale

    Sets the indicator's scale.

    Auto: Visualization sets the scale from 0 to the maximum field value. Manual: allows you to manually set the min and max values for the indicators.

    Column fill color

    Fills the cells with different colors from a gradient depending on the value. Please note: this setting overrides the Linear indicator.

    On: apply the color fill. Off: remove color fill.

    By field

    Sets the field from which to get the values for the fill color.

    Select the field from the drop-down menu.

    Fill type

    Selects a color fill type for linear indicators.

    Gradient: sets the gradient from which to get the colors depending on the field value.

  • for String type fields:

    Name

    Description

    Possible values

    Name

    Sets the name of the dimension

    A string of characters.

    Type

    Sets the field's data type.

    Integer, Fractional number, String, Logical, Date, Date and time

    Aggregation

    Sets the aggregation type

    No: doesn't apply aggregation. Count: applies the COUNT function to the data field, and shows the total number of entries. Count distinct: applies the COUNTD function to the data field, and returns the number of unique values in the field.

    Column fill color

    Fills the cells with different colors from a gradient depending on the value.

    On: apply the color fill. Off: remove color fill.

    By field

    Sets the field from which to get the values for the fill color.

    Select the field from the drop-down menu.

    Fill type

    Selects a color fill type for linear indicators.

    Palette: displays a pop-up to select a pallette and choose one of the predefined colors from it.

  • for Date type fields:

    Name

    Description

    Possible values

    Name

    Sets the name of the data field

    A string of characters.

    Type

    Sets the field's data type.

    Integer, Fractional number, String, Logical, Date, Date and time

    Grouping

    Sets the grouping and rounding by time period.

    No - doesn't apply grouping. Rounding - rounds the values by Year, Quarter, Month, Week or Day. Date part - returns the number of a time period: Year, Quarter, Month, Week, Day of week, or Day.

    Date mode

    Toggles the date display mode.

    Continuous - display all the dates continuously. Discrete - show only the dates containing values.

    Aggregation

    Applies a selected aggregation function to the data field.

    No: doesn't apply aggregation. Count: applies the COUNT function, returns the total number of entries. Minimum: applies the MIN function, returns the minimum value. Maximum: applies the MAX function, returns the maximum value. Count distinct: applies the COUNTD function to the data field, and returns the number of unique values in the field. Average: applies the AVG function, returns the arithmetic mean value.

  • for Geodata type fields:

    Name

    Description

    Possible values

    Name

    Sets the name of the data field

    A string of characters.

    Type

    Sets the field's data type.

    Integer, Fractional number, String, Logical, Date, Date and time, Geopoint, Geopolygon

    Aggregation

    Sets the aggregation type

    No: doesn't apply aggregation. Count: applies the COUNT function to the data field, and shows the total number of entries.

    Column fill color

    Fills the cells with different colors from a gradient depending on the value.

    On: apply the color fill. Off: remove color fill.

To open chart settings, click to the right of the chart type above the wizard slot fields. You'll see a dialog window with the following controls:

Control Default state Description
Header Off Displays the specified text in the centered line above the chart.
Pagination On Shows pagination controls if the number of rows exceeds the number specified in the Limit setting.
Limit 100 Sets the number of rows per page if pagination is enabled.
Grouping On Switches between displaying unique (On) and all available (Off) values.
Totals Off Displays a row with total values for columns.

After managing the controls, click Apply to see the results on the chart preview.

To open slot settings, click in a row with the slot name.

Columns:

For each cell column, you have a toggle switch with the following positions:

  • Auto - sets the column width automatically.

  • % - set the column width as the percentage from the total table width. Specify it as a number in the text field to the right of the toggle switch.

  • px - set the column width as the number of pixels. You can specify this number in the text field to the right of the toggle switch.

    Tip

    The % and px options enable word wrap for the columns to which they're applied.

  • Use a hierarchy to add an additional nesting layer of data in your table.

  • To embed links into your table cells, use the URL function.

    • Click the column header to sort the table by its value:

      table-sorting

  • If you have a column with a lot of text, enable word wrap for it:

    1. Click the in the Columns slot.

    2. For the column with a lot of text, select % or px and specify the desired width accordingly.

    3. Click Apply.