# table properties

Information noteSTABLE.   
  
This API is reliable and breaking changes are unlikely.

table()

These are the properties used by Qlik Sense straight tables.

## Version history

Version history

| Version state | Details |
| --- | --- |
| Introduced | 2.2 |

## Properties

### showTitles

Type: Boolean

Show title for the visualization.

Default: true.

### showDetails

Type: Boolean

Sets if visualization details should be shown.

Default: false

### title

Type: String | qStringExpression

Visualization title shown if "showTitles": true.

### subtitle

Type: String | qStringExpression

Visualization subtitle shown if "showTitles": true.

### footnote

Type: String | qStringExpression

Visualization footnote shown if "showTitles": true.

### disableNavMenu

Type: Boolean

Disables the hover menu in the visualization.

Default: false

### qHyperCubeDef

Type: Object

The hypercube definition used by most visualizations.

A subset of the properties available in the qHyperCubeDef is presented here. For complete documentation of all available properties, see [Engine API: HyperCubeDef](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/EngineJSONAPI/Content/models-hypercubedef.htm).

#### columnOrder

Type: Array

Index array that determines the column order, where 0 is the first column, 1 is the second, and so on. If omitted, a default value will be used.

#### columnWidths

Type: Array

Array that determines the column widths. If omitted, a default value will be used.

-1 equals to auto.

#### qDimensions

Type: Array

Extends NxDimension, see [Engine API: NxDimension](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/EngineJSONAPI/Content/models-nxdimension.htm).

* **qDef**

  Type: Object

  Extends NxInlineDimensionDef, see [Engine API: NxInlineDimensionDef](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/EngineJSONAPI/Content/models-nxinlinedimensiondef.htm).

  Additional properties:

  * **autoSort**

    Type: Boolean

    Description: Defines if the dimension should be auto-sorted. Default: true.

  * **cId**

    Type: String

    Description: ID used by the client. Must be unique within the current chart.

  * **othersLabel**

    Type: StringExpressionContainer

    Description: Label for the others group if dimension limits are used.

  * **textAlign**

    Text alignment settings.

    textAlign Properties

    | Name | Type | Description |
    | --- | --- | --- |
    | auto | Boolean | Can be one of:<br><br><ul> <li><span>true</span> </li> <li><span>false</span> </li> </ul><br><br>Default: true |
    | align | String | Can be one of:<br><br><ul> <li><span>left</span> </li> <li><span>right</span> </li> <li><span>center</span> </li> </ul><br><br>Default: left |

  * **representation**

    Type: Object

    Representation settings.

    representation properties

    | Name | Type | Description |
    | --- | --- | --- |
    | type | String | Determines how column values are represented. One of:<br><br><ul> <li><span>text</span> </li> <li><span>url</span> </li> </ul><br><br>Default: text |
    | urlLabel | String | Label to use when represented as url. Used as a static string, like “Click here”. An empty string displays the actual URL. |
    | urlLabel | Object | Label to use when represented as url. Used with an expression for the Label part of the link.<br><br><ul> <li><span>qStringExpression</span>: Object<ul><li><span>qExpr</span>: String. The expression used to generate the <span>Label</span> part of the link. Needs to be set in <span>representation.qAttributeExpressions</span> array, as well as in the Object with <span>id=’urlLabel’</span>.</li></ul></li> </ul> |
    | linkUrl | Object | URL to use when represented as url. Used with an expression for the URL part of the link. Use dimension or attribute.<br><br><ul> <li><span>qStringExpression</span>: Object<ul><li><span>qExpr</span>: String. The expression used to generate the <span>url</span> part of the link. Needs to be set in <span>representation.qAttributeExpressions</span> array, as well as in the Object with <span>id=’urlLabel’</span>.</li></ul></li> </ul> |
    | urlPosition | String | The position of the url part of the link. One of:<br><br><ul> <li><span>dimension</span> </li> <li><span>attribute</span> </li> </ul><br><br>If the property is not set, it is treated as having the value of dimension. |
    | qAttributeExpressions | Array | Label expression:<br><br>**qExpression**: Type: String. The string containing the expression used for the URL labels.<br><br>**id**: Type: String. The urlLabel.<br><br>**qAttribute**: Type: Boolean. Attribute enabled. Default: true.<br><br>URL expression:<br><br>**qExpression**: Type: String. The string containing the expression used for the URL hyperlinks.<br><br>**id**: Type: String. The url.<br><br>**qAttribute**: Type: Boolean. Attribute enabled. Default: true. |

  * **modifiers**

    Type: Array

    Description: Set to apply a modifier to a measure.

    Available modifiers

    | Name | Type | Description |
    | --- | --- | --- |
    | accumulation | Object | Only displayed when accumulation has been set as a modifier. It allows you to accumulate values of your measure over one or two dimensions.<br><br>Properties:<br><br><ul> <li><strong>accumulationDimension</strong>: <span>Type: Integer</span>. Only displayed when there are two dimensions. Selects the dimension on which the accumulation will take place. If the accumulation is made across multiple dimensions, this will be the first dimension.</li> <li><strong>crossAllDimensions</strong>: <span>Type: Boolean</span>. Only displayed when there are two dimensions. Continues accumulation across both dimensions.</li> <li><strong>fullAccumulation</strong>: <span>Type: Boolean</span>. Select whether the accumulation will happen on the <span>Full</span> range or <span>Custom</span> range.</li> <li> <p><strong>steps</strong>: <span>Type: Integer</span>. Only displayed when <span>Range</span> is set to <span>Custom</span>. The number of steps in the dimensions which form an accumulation range. Only zero and positive integers are accepted. <br>Note: Sorting order of dimension values (or step order) is important and affects results.</p> </li> <li><strong>outputExpression</strong>: <span>Type: String</span>. Shows the expression used by the modifier.</li> <li><strong>showExcludedValues</strong>: <span>Type: Boolean</span>. Shows the excluded values (values not in the current selection) in the accumulation.</li> <li><strong>disabled</strong>: <span>Type: Boolean</span>.</li> </ul> |
    | movingAverage | Object | Only displayed when **movingAverage** has been set as a modifier.<br><br>Properties:<br><br><ul> <li><strong>primaryDimension</strong>: <span>Type: Integer</span>. Only displayed when there are two dimensions. Selects the dimension on which the moving average will take place. If the moving average is made across multiple dimensions, this will be the first dimension.</li> <li><strong>crossAllDimensions</strong>: <span>Type: Boolean</span>. Only displayed when there are two dimensions. Continues the moving average across both dimensions.</li> <li><strong>fullRange</strong>: <span>Type: Boolean</span>. Select whether the moving average will happen on the Full range or Custom range.</li> <li><strong>steps</strong>: <span>Type: Integer</span>. Only displayed when <span>Range</span> is set to <span>Custom</span>. The number of steps in the dimension which form a moving average. Only zero and positive integers are accepted. Note: Sorting order of dimension values (or step order) is important and affects results.</li> <li> <p><strong>nullSuppression</strong>: <span>Type: Boolean</span>. Choose to have null values calculated by the moving average modifier.</p> </li> <li><strong>outputExpression</strong>: <span>Type: String</span>. Shows the expression used by the modifier.</li> <li><strong>showExcludedValues</strong>: <span>Type: Boolean</span>. Shows the excluded values (values not in the current selection) in the moving average.</li> <li><strong>disabled</strong>: <span>Type: Boolean</span>.</li> </ul> |
    | difference | Object | Only displayed when **difference** has been set as a modifier.<br><br>Properties:<br><br><ul> <li><strong>primaryDimension</strong>: <span>Type: Integer</span>. Only displayed when there are two dimensions. Selects the dimension on which the difference will take place. If the difference is made across multiple dimensions, this will be the first dimension.</li> <li><strong>crossAllDimensions</strong>: <span>Type: Boolean</span>. Only displayed when there are two dimensions. Continues the difference across both dimensions.</li> <li><strong>outputExpression</strong>: <span>Type: String</span>. Shows the expression used by the modifier.</li> <li><strong>showExcludedValues</strong>: <span>Type: Boolean</span>. Shows the excluded values (values not in the current selection) in the difference.</li> <li><strong>disabled</strong>: <span>Type: Boolean</span>.</li> </ul> |
    | relativeNumber | Object | Only displayed when **relativeNumber** has been set as a modifier. Allows you to see relative percentages to see the impact of specific selections, relative to the selection, relative to the total, or relative to other fields. You can change the basis upon which the relative number is calculated.<br><br>Properties:<br><br><ul> <li><strong>dimensionalScope</strong>: <span>Type: Integer</span>. Sets whether the relative numbers are calculated based on a dimension. You can choose to have the modifier respect all available dimensions, respect a specific dimension if there are two, or to disregard the dimensions. The dimension values can be one of:<ul><li><span>respectOneDimension</span>: Value: 0. Available when more than one dimensions are available. Calculates the subtotal for that dimension.</li><li><span>respectAllDimensions</span>: Value: 1. Available when more than one dimensions are available. Uses all dimensions when calculating the modifier. The calculated number is relative to every dimensional value, for both dimensions.</li><li><span>disregardDimension</span>: Value: 2. Available when more than one dimensions are available. Uses the total when calculating the modifier. The calculated number is relative to the total.</li><li><span>disregardAllDimensions</span>: Value: 3. Available when more than one dimensions are available. Uses the total when calculating the modifier. The calculated number is relative to the total.</li></ul></li> </ul><br><br><ul> <li><strong>selectionScope</strong>: <span>Type: Integer</span>. Sets whether the relative numbers are calculated based on the current selection or a specific field value. You can also disregard the current selection. The selection values can be one of:<ul><li><span>currentSelection</span>: Value: 0. Uses current selection to calculate modifier.</li><li><span>selectFieldValue</span>: Value: 1. Uses a field to calculate the modifier.</li><li><span>disregardSelection</span>: Value: 2. Disregards any selections when calculating the modifier.</li></ul></li> </ul> |

* **qAttributeExpressions**

  Type: Array

  Extends NxAttrExprDef, see [Engine API: NxAttrExprDef](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/EngineJSONAPI/Content/models-nxattrexprdef.htm).

  id

  Type: String

  One of:

  * cellBackgroundColor: for attribute expression, expression for background color of table cell.
  * cellForegroundColor: for attribute expression, expression for text color of table cell.

#### qMeasures

Type: Array

Description: Extends NxMeasure, see [Engine API: NxMeasure](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/EngineJSONAPI/Content/models-nxmeasure.htm).

Additional properties

* **qDef**

  Type: Object

  Extends NxInlineMeasureDef, see [Engine API: NxInlineMeasureDef](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/EngineJSONAPI/Content/models-nxinlinemeasuredef.htm).

  Additional properties:

  * 

    **representation**

    Type: Object

    Representation settings.

    representation properties

    | Name | Type | Description |
    | --- | --- | --- |
    | type | String | Determines how column values are represented. One of:<br><br><ul> <li><span>text</span> </li> <li><span>indicator</span> </li> <li><span>miniChart</span> </li> </ul> |
    | indicator | Object | Indicator properties.<br><br><ul> <li><strong>showTextValues</strong>: <span>Type: Boolean</span>. Controls if text value is shown with indicator.</li> <li><strong>applySegmentColors</strong>: <span>Type: Boolean</span>. Controls if text color should match indicator color.</li> <li><strong>position</strong>: <span>Type: String</span>. Can be either <span>Left </span>or <span>right</span>. Controls if the indicator should be to the left or right of the text.</li> </ul> |
    | miniChart | Object | miniChart properties.<br><br><ul> <li><strong>type</strong>: <span>Type: String</span>. Chart type. Can be one of:                                                        <ul><li><span>sparkline</span></li><li><span>dots</span></li><li><span>bars</span></li><li><span>posNeg</span></li></ul></li> <li><strong>showDots</strong>: <span>Type: Boolean</span>. Only used for <span>sparkline</span>.</li> <li><strong>colors</strong>: <span>Type: Object</span>. Color settings.                                                        <ul><li><span>main</span><ul><li>index (Integer): Index in palette of the main color used in the mini-chart. </li><li>color (String): Color as HEX string. Optional, only used as default.</li></ul></li><li><!--[CDATA[                                                                        ]]--><span>min</span><ul><li>index (Integer): Index in palette used to color  min data values. Not used for <span>posNeg</span>.</li><li>color (String): Color as HEX string. Optional, only used as default.</li></ul></li><li><!--[CDATA[                                                                        ]]--><span>max</span><ul><li>index (Integer): Index in palette used to color max data values. Not used for <span>posNeg</span>.</li><li>color (String): Color as HEX string. Optional, only used as default.</li></ul></li><li><span>first</span><ul><li>index (Integer): Index in palette used to color the first data value. Not used for <span>posNeg</span>.</li><li>color (String): Color as HEX string. Optional, only used as default.</li></ul></li><li><span>last</span><ul><li>index (Integer): Index in palette used to color the last data value.  Not used for <span>posNeg</span>.</li><li>color (String): Color as HEX string. Optional, only used as default.</li></ul></li><li><span>positive</span><ul><li>index (Integer): Index in palette only used by   <span>posNeg</span> to color all positive values. </li><li>color (String): Color as HEX string. Optional, only used as default.</li></ul></li><li><span>negative</span><ul><li>index (Integer): Index in palette only used by <span>posNeg</span> to color all negative values.</li><li>color (String): Color as HEX string. Optional, only used as default.</li></ul></li></ul></li> <li><strong>yAxis</strong>: <span>Type: Object</span>. Y&nbsp;axis settings.                                                        <ul><li><span>scale </span>(String): Can be one of: <ul><li><span>local</span>: The y-axis is scaled to the min and max values per cell.</li><li><span>global</span>: The y-axis is scaled the same way across the entire column, that is, the y-axis has the same min and max value for all charts in that column.</li></ul><p>Not used for  <span>posNeg</span>.</p></li><li><span>position </span>(String): Can be one of: <ul><li><span>auto</span>: For <span>Sparkline</span> and <span>dots</span>, the min and max values are used from the data. For <span>bars</span>, the axis starts from zero.</li><li><span>zeroBaseline</span>: The y-axis starts/ends from zero, but depends on the min and max values of the data rendered.<p>Only used for <span>sparkline</span> and <span>dots</span>. If used with <span>bars</span>, behavior is the same as <span>auto</span>.</p></li><li><span>zeroCenter</span>: The y-axis has zero in the center and scaled so that min and max are the same absolute number.</li></ul><p>Not used for <span>posNeg</span>.</p></li></ul></li> </ul> |

  * **qMiniChartDef**

    Type: Object

    * **qLibraryId**

      Type: String

      Description: See engine API doc.

    * **qDef**

      Type: String

      Description: See engine API doc.

    * **qNullSuppression**

      Type: Boolean

      Description: See engine API doc.

    * Default: true

    * **qOtherTotalSpec**

      Type: Object

      * **qSuppressOther**

        Type: Boolean

        Description: See engine API doc.

        Default: true

  * **conditionalColoring**

    Type: Object

    Description: Coloring settings.

    * **segments**

      Type: Object

      Segment settings.

      segments properties

      | Name | Type | Description |
      | --- | --- | --- |
      | limits | Array | Color gradient limitations.<br><br><ul> <li><strong>value</strong>: <p><span>Type: ValueExpressionContainer</span></p>Description: Value expression container.</li> <li><strong>gradient</strong>: <p><span>Type: Boolean</span></p>Description: Set to use gradient between segments.</li> </ul> |
      | paletteColors | Object | Replaces segment colors and provides ability to set custom colors. Overrides segment.colors when set.<br><br><ul> <li><strong>color</strong>: <p><span>Type: String</span></p>Color as hex string (mandatory if index: -1)</li> <li><strong>index</strong>: <p><span>Type: Integer</span></p>Index in palette. Default: <span>6</span></li> <li><strong>icon</strong>: <p><span>Type: String</span></p>Icon to use in a segment. Optional.</li> </ul> |

  * **textAlign**

    Text alignment settings.

    textAlign Properties

    | Name | Type | Description |
    | --- | --- | --- |
    | auto | Boolean | Can be one of:<br><br><ul> <li><span>true</span> </li> <li><span>false</span> </li> </ul><br><br>Default: true |
    | align | String | Can be one of:<br><br><ul> <li><span>left</span> </li> <li><span>right</span> </li> <li><span>center</span> </li> </ul><br><br>Default: left |

  * 

    **autoSort**

    Type: Boolean

    Description: Defines if the dimension should be auto-sorted.

    Default: true

  * 

    **numFormatFromTemplate**

    Type: Boolean

    Description: When enabled, the number format to use can be selected from multiple predefined formats based on the desired type: number or date.

    Default: true

  * 

    **isCustomFormatted**

    Type: Boolean

    Description: Set to true to toggle off the default client formatting.

* **qAttributeExpressions**

  Type: Array

  Extends NxAttrExprDef, see [Engine API: NxAttrExprDef](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/EngineJSONAPI/Content/models-nxattrexprdef.htm).

  id

  Type: String

  One of:

  * cellBackgroundColor: for attribute expression, expression for background color of table cell.
  * cellForegroundColor: for attribute expression, expression for text color of table cell.

#### qLayoutExclude

Type: Object

#### customErrorMessage

Type: Object

Set to define custom error messages.

* **calcCondition**

  Type: String

  Description: Deprecated. Use qCalcCondition.qMsg instead. Set to customize the calculation condition unfilled message.

### components

Type: Array

Component settings. All theme component properties are unset (null) when creating a chart. The values for each attribute are fetched from the current theme. Setting any property here will override the theme used.

Additional properties:

#### key

Type: String

Determines which component the settings apply to.

Default: theme

#### content

Type: Object

Content font and interaction settings.

content properties

| Name | Type | Description |
| --- | --- | --- |
| fontSize | Integer | Font size of pivot table content text.<br><br>Default: unset |
| fontColor | Object | Set to specify color:<br><br>{index: 2, color: '#ff0055'}<br><br>Default: unset |
| hover | Object | Set to specify color when hovering over a row.<br><br><ul> <li>backgroundColor: (String)<p>Background color when hovering</p><p>Default: <span>unset</span></p></li> <li>color: (String)<p>Font color when hovering.</p><p>Default: <span>unset</span></p></li> </ul> |

#### header

Type: Object

Header object font settings.

header properties

| Name | Type | Description |
| --- | --- | --- |
| fontSize | Integer | Font size of pivot table header text.<br><br>Default: unset |
| fontColor | Object | Set to specify color:<br><br>{index: 2, color: '#ff0055'}<br><br>Default: unset |

#### scrollbar

Type: Object

Scroll bar settings.

scrollbar properties

| Name | Type | Description |
| --- | --- | --- |
| size | String | Sets the width of the scroll bar.<br><br>Information noteIn touch screen mode, the scroll bar always has a standard size.<br><br>Possible values:<br><br><ul> <li>small</li> <li>medium</li> <li>large</li> </ul><br><br>Default: unset<br><br>The default is inherited from Theme. If Theme is not set, small becomes the default. |

### totals

Type: Object

### scrolling

Type: Object

Settings related to scrolling behavior.

scrolling properties

| Name | Type | Description |
| --- | --- | --- |
| keepFirstColumnInView | Boolean | Specifies if the first column should be locked when the content is scrolled horizontally. Locking the first column allows to easily associate content in other columns with the objects represented in the rows.<br><br>Default: false |
| keepFirstColumnInViewTouch | Boolean | Specifies if the **keepFirstColumnInView** property applies to touch screen devices.<br><br>Default: false |
| horizontal | Boolean | Specifies if the content is scrolled horizontally (true), or hides the columns that cannot be rendered in the given space in a column picker (false).<br><br>Default: true |

### scrollbar

Type: Object

Scroll bar settings.

Additional properties:

#### size

Sets the width of the scroll bar.

Information noteIn touch screen mode, the scroll bar always has a standard size.

Type: String

Can be one of:

* small
* medium
* large

Default: unset

The default is inherited from Theme. If Theme is not set, small becomes the default.

### search

Type: Object

Search settings.

Additional properties:

#### sorting

Type: String

The settings for sorting the values of a dimension.

sorting properties

| Name | Type | Description |
| --- | --- | --- |
| auto | Boolean | Specifies if the search values of a dimension are auto sorted alphabetically or numerically in ascending order.<br><br>Default: true |
| inherit | Boolean | Specifies if the sort settings are inherited from the dimension selected by the user. |

### multiline

Type: Object

Header and text wrapping settings.

multiline properties

| Name | Type | Description |
| --- | --- | --- |
| wrapTextInHeaders | Boolean | Set to true to enable text wrapping into multiple lines in the table headers. When disabled, the table headers appear more compact.<br><br>Default: true |
| wrapTextInCells | Boolean | Set to true to enable text wrapping into multiple lines in the tables data cells. When disabled, the table cell content appear more compact and more rows can be shown on the screen.<br><br>Default: true |

## Example 1 using Visualization API

Tip noteFor more examples of how to create tables on the fly, see [Mashups: Creating tables](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/Mashups/Content/Sense_Mashups/Create/Visualizations/Table/create-table.htm).

In this example, we create a basic table, containing one dimension and four measures. The measures have basic number formatting applied and the dimension is sorted by load order. No options are defined for the table.

```
app.visualization.create(
  'table',
  [
    {
      "qDef": {
        "qFieldDefs": [
          "=If(Par>3,TClubName)"
        ],
        "qFieldLabels": [
          "Tee club"
        ],
        "qSortCriterias": [
          {
            "qSortByLoadOrder": 1
          }
        ]
      },
      "qNullSuppression": true
    },
    {
      "qDef": {
        "qLabel": "#",
        "qDef": "Count(HoID)"
      }
    },
    {
      "qDef": {
        "qLabel": "FIR%",
        "qDef": "Avg(FwHit)",
        "qNumFormat": {
          "qType": "F",
          "qnDec": 2,
          "qUseThou": 0,
          "qFmt": "0.0%",
          "qDec": ".",
          "qThou": ","
        }
      }
    },
    {
      "qDef": {
        "qLabel": "Avg",
        "qDef": "Avg(DrDist)",
        "qNumFormat": {
          "qType": "F",
          "qnDec": 2,
          "qUseThou": 0,
          "qFmt": "#,##0.00 m",
          "qDec": ".",
          "qThou": ","
        },
        "numFormatFromTemplate": false
      }
    },
    {
      "qDef": {
        "qLabel": "Max",
        "qDef": "Max(DrDist)",
        "qNumFormat": {
          "qType": "F",
          "qnDec": 2,
          "qUseThou": 0,
          "qFmt": "#,##0 m",
          "qDec": ".",
          "qThou": ","
        },
        "numFormatFromTemplate": false
      }
    }
  ],
  {
  }
).then(function(vis){
  vis.show("QV01");
});
```

## Example 2 using Visualization API

In this example, we create a table with mini-charts, containing two dimensions and one measure.

```
app.visualization.create(
    'table',
    [
        {
            "qDef": {
                "qFieldDefs": [
                    "Product"
                ],
                "qFieldLabels": [
                    "Product"
                ],
                "qSortCriterias": [
                    {
                        "qSortByLoadOrder": 1
                    }
                ]
            },
            "qNullSuppression": true
        },
        {
            "qDef": {
                "qLabel": "Sum Sales",
                "qDef": "Sum(Sales)",
                "representation": {
                    "type": "miniChart", 
                    "miniChart": {
                        "type": "sparkline",
                        "colors": {
                            "main": {
                                "index": 6
                            },
                            "max": {
                                "index": 0,
                                "color": "none"
                            },
                            "min": {
                                "index": 0,
                                "color": "none"
                            },
                            "first": {
                                "index": 0,
                                "color": "none"
                            },
                            "last": {
                                "index": 0,
                                "color": "none"
                            },
                            "positive": {
                                "index": 6
                            },
                            "negative": {
                                "index": 10
                            }
                        },
                        "showDots": true,
                        "yAxis": {
                            "scale": "local",
                            "position": "auto"
                        }
                    }
                },
            },
            "qMiniChartDef": {
                "qDef": "Date.autoCalendar.Month",
            }
        },
    ],
    {}
).then(function(vis){
    vis.show("QV01");
});
```