Straight table
The Straight table shows several fields simultaneously, where the content of each row is logically connected. A table can consist of as many dimensions and measures as needed. The Straight table is included in the Visualization bundle.
App creators can add many fields simultaneously, customize the table at the column-level, add alternative dimensions and measures, set column width, apply pagination and turn on chart exploration.
Chart exploration allows users that do not have edit rights to customize the original straight table when they are in analysis mode. These users can add or remove columns, change sort order, re-arrange columns, and make selections. They can then share, download, subscribe, or bookmark the new table layout. The changes made in chart exploration mode by a user are not seen by other users analyzing the sheet.
When to use it
Use a straight table when you want to view detailed data and precise values rather than visualizations of values. Tables are good when you want to compare individual values. Drill-down group dimensions are very efficient in tables. Within a limited space, you can drill down to the next level of detail and analyze the updated measure values. Use this table when you want users to be able to create custom tables in analysis mode.
Advantages
You can filter and sort the table in different ways. Many values can be included in a table, and when you drill down in a table, you make good use of the limited space on the sheet. A table is excellent when you want to see exact values rather than trends or patterns. Tables are an easy way to export data into other programs.
Disadvantages
If the straight table contains many values, it is difficult to get an overview of how values are related. It is also hard to identify an irregularity within the table.
Best practices for optimizing tables
If a table has too many dimensions and measures, it may load slowly. As a best practice, add the majority of your fields and expressions as Alternative columns. This encourages users to add only the fields they need using chart exploration.
You can also increase performance by ensuring a table has 10 columns or less.
Tables that extract fields from a single data source will perform better than tables that contain fields from multiple data sources.
Creating a straight table
You can create a straight table on the sheet you are editing.
Do the following:
- In the assets panel, open Custom objects > Qlik Visualization bundle and drag a Straight table object to the sheet.
- Click Add columns to add items to the table. A dropdown will open:
- Fields & master items: Opens a searchable dialog box displaying every field and master item. You can choose to add any item as a dimension or measure.
- Custom expression: Opens a dialog box where you can type in an expression, or open the expression editor .
- In the properties panel, under Data, click to add more dimensions or measures to the table.
When you have created the table, you may want to adjust its appearance and other settings in the properties panel. For information about styling, see Styling the straight table.
Working with table items
Do the following:
-
In the Data tab of the properties panel, under Columns and Alternative columns, click the checkbox next to any item. Click to perform actions such as cut, paste, and delete. Click the checkbox next to Columns or Alternative columns to select all items in the list. Use the arrow icons to move items between each section.
Information noteAlternative columns are columns that users can choose to add to the table when using Using chart exploration. -
To change the column order, clicknext to a field or expression and drag the item.
-
Click on an item name to open its individual properties. Here you can change the label, set a background color for the column, control text alignment, set column width, and more. For more information, see the sections below.
Information noteIf Text alignment is set to Auto, column data is aligned according to data type: text values are left-aligned and number values, including date related values, are right-aligned. If you set it to Custom, you can align the data to the left, center, or right.
Defining column text style with an expression
For each column, you can set a separate expression to define how the column text is styled. If you style a column's text with an expression, this expression overrides the app theme, and any custom styling applied to the visualization, for that column.
You can use the following syntax in your expression to define the styling (the letter in the tag is not case sensitive):
-
<B>: Bold
-
<I>: Italics
-
<U>: Underlined
-
<S>: Strikethrough
More than one of the options above can be applied at a time.
Examples:
Do the following:
-
Under Data, select a column and open Presentation in the properties.
-
Under Text style expression, enter the expression. Click to open the expression editor.
Formatting dimension representation
You can format dimension columns to show values, links, or images using Representation in the properties panel. You can select the following representations:
- Text: Displays the dimension values as text. This is the default value.
-
Link: Displays values as clickable links. Either the dimension value is used or the URL or you can add other URLs to the displayed dimension values.
Formatting links
The character ; is not supported as a query parameter separator in a URL.
Do the following:
-
Under Data, select a dimension and open Presentation in the properties.
-
Under Representation, select Link.
-
Under Link setting, select one of the following:
-
Add label: The dimension contains the destination URL in either the dimension expression or the data table. The links are displayed and ordered by destination URL expression.
Under Link label, enter a descriptive text label for the destination URL. Click to open the expression editor.
-
Add URL: The dimension values become selectable text links that are labels for the URLs.
Under Link URL, enter the destination URL expression. Click to open the expression editor.
-
Formatting images
Images in straight tables are only accessible from servers and domains that have been safe-listed. Administrators make these resources available in the Management Console by adding Content-Security-Policies (CSP) for each server or domain. CSP helps to prevent cross-site scripting attacks by controlling what resources a browser can request from a server.
The character ; is not supported as a query parameter separator in a URL.
Do the following:
-
Under Data, select a dimension and open Presentation in the properties.
-
Under Representation, select Image.
-
Under Image setting, select one of the following:
-
Add label: The dimension contains the absolute URL to the image in either the dimension expression or the data table. The links are displayed and ordered by the URL expression.
Under Image label, enter a descriptive text label for the image that displays as alternative text when the image is hovered over. Click to open the expression editor.
-
Add URL: The dimension values become labels for the alternative text that displays when the image is hovered over.
Under Image URL, enter the destination URL expression. Click to open the expression editor.
-
-
Under Sizing, select one of the following sizing options:
-
Always fit
-
Fit to width
-
Fit to height
-
Stretch to fit
-
Original size
-
-
Under Position, select the image position within the cell.
Sorting the table
You can adjust the sorting of the table in several ways:
- Column sorting: Adjust the order of the dimensions and measures from left to right .
- Row sorting: Adjust the sorting priority order of the rows.
- Internal sorting: Use the internal sorting order of dimensions and measures.
- Interactive sorting: During analysis, you can click on a column header to sort the table.
Column sorting
By default, the order in which columns are sorted is set by the order in which dimensions and measures are added to the table. If you add the measure Sales first, it is presented first (leftmost) in the table. The next dimension or measure that is added is presented in the second column, and so on. The column sorting order can be changed in the properties panel, under Columns.
Row sorting
By default, rows are sorted by the first added dimension or measure, numeric values descending, text values ascending. A small arrow under the column header shows by which column the table is sorted.
You can change the row sorting in the properties panel, under Sorting. Drag the dimensions and measures to change the sorting priority order. In many cases, sorting is not only affected by the first dimension or measure in Sorting, but also the following ones.
Example:
In the following screenshot, the rows are first sorted by Customer, then by Month, and then by Product Type. As you can see, the columns Customer and Month have several rows with the same values (A-2-Z Solutions and Month). The rows in Product Type are ordered alphabetically, but only those that were sold in January to the customer A-2-Z Solutions are displayed.
By changing the sorting order, so that secondary sorting is by Product Type, followed by Month, all Product Type items sold to the customer A-2-Z Solutions are presented in alphabetical order, whereas only the months when they were sold are displayed under Month.
Internal sorting
Each dimension and measure has a default (Auto) internal sorting order, which can be changed. Under Sorting, click the item you want to change and click the button to switch to Custom sorting. Changes made to the internal sorting of an item may not have any effect if the sorting is in conflict with an item with higher priority.
Interactive sorting
During analysis, you can set which column to sort on by clicking the column header. The first click sorts the table according to the default sorting of the selected item. A second click reverses the sorting order. Interactive sorting is session based and is not saved. If you want your changes to the sorting to be persistent, you need to make the changes in the properties panel.
Users with the ability to edit the sheet can sort interactively using chart exploration, click Edit sheet, and save those changes to the original table.
Working with add-ons
Straight tables have the following options under Add-ons in the properties panel:
Data handling:
- Include zero values: When unselected, measures that have the value ‘0’ are not included in the presentation. If there is more than one measure value, all the measure values must have the value ‘0’ to be excluded from the presentation.
-
Calculation condition: Specify an expression in this text field to set a condition that needs to be fulfilled (true) for the object to be displayed. The value may be entered as a calculated formula. For example: count(distinct Team)<3. If the condition is not fulfilled, the message or expression entered in Displayed message is displayed.
A calculation condition is useful when a chart or table is slow to respond due to a large amount of data. You can use the calculation condition to hide an object until the user has filtered the data to a more manageable level by applying selections. Use the Displayed message property to guide the user to filter the data.
Styling the straight table
You have a number of styling options available under Appearance in the properties panel.
Click Styling under Appearance > Presentation to further customize the styling of the chart. The styling panel contains various sections under the General and Chart tabs.
You can reset your styles by clicking next to each section. Clicking Reset all resets styles for all available tabs in the styling panel.
For general information about styling an individual visualization, see Applying custom styling to a visualization.
Customizing the text
You can set the text for the title, subtitle, and footnote under Appearance > General. To hide these elements, turn off Show titles.
The visibility of the different labels on the chart depends on chart-specific settings and label display options. These can be configured in the properties panel.
You can style the text that appears in the chart.
Do the following:
-
In the properties panel, expand the Appearance section.
-
Under Appearance > Presentation, click Styling.
-
On the General tab, set the font, emphasis style, font size, and color for the following text elements:
-
Title
-
Subtitle
-
Footnote
-
-
On the Chart tab, set the font, emphasis style, font size, and color for the following text elements:
-
Header: Style the text of the headers for the dimensions and measures.
-
Dimension values: Style the text dimension values.
-
Measure values: Style the text of the measure values.
-
Totals: Style the text of the totals, if you have selected to show a Totals row under Appearance > Presentation.
-
Null values: Style the text of the null values.
-
-
On the Chart tab, customize the Null values styling. You can change emphasis style and color.
You can also style the text for each column in the table. You can configure text color, style, and alignment. These settings are configured in the Data tab of the properties panel. If you have styled a column individually, this styling will override any text styling applied at the chart level. For more information, see Working with table items.
Additionally, you can customize how the text appears when a user hovers over a row. See Customizing the hover behavior.
Customizing the background
You can customize the background of the chart. The background can be set by color and image.
Do the following:
-
In the properties panel, expand the Appearance section.
-
Under Appearance > Presentation, click Styling.
-
On the General tab of the styling panel, you can select a background color (single color or expression). You can also set the background to an image from your media library or from a URL.
When using a background color, use the slider to adjust the opacity of the background. The chart header always displays with 100% opacity.
When using a background image, you can adjust image sizing and position.
-
On the Chart tab, customize the background color for the following elements:
- Header (100% opacity is used)
Dimension values
Measure values
Measure labels
Totals (100% opacity is used)
Null values
Customizing the grid
You can customize the table grid.
Do the following:
-
In the properties panel, expand the Appearance section.
-
Under Appearance > Presentation, click Styling.
-
On the Chart tab, customize the grid with the following elements:
-
Row height: Set the height of rows in lines.
-
Border: Set the color of the cell borders.
-
Divider: Set the color of the divider between that divides the header and body of the table.
-
Customizing the hover behavior
You can set display options for when a user hovers over a row in the table.
Do the following:
-
In the properties panel, expand the Appearance section.
-
Under Appearance > Presentation, click Styling.
-
On the Chart tab of the styling panel, under Row hover, adjust the following settings:
-
To highlight rows in the table when a user hovers over them, set the switch to On. Switch the behavior off according to preference.
-
Row hover color: Set the color to highlight the row when a user hovers over it.
-
Row hover font color: Set the color of the text in the highlighted row when a user hovers over it.
-
Customizing the border and shadow
You can customize the border and shadow of the chart.
Do the following:
-
In the properties panel, expand the Appearance section.
-
Under Appearance > Presentation, click Styling.
-
On the General tab of the styling panel, under Border, adjust the Outline size to increase or decrease the border lines around the chart.
-
Select a color for the border.
-
Adjust the Corner radius to control the roundness of the border.
-
Under Shadow in the General tab, select a shadow size and color. Select None to remove the shadow.
Using chart exploration
Chart exploration allows app consumers and other users that do not have edit rights to customize the original straight table when they are in analysis mode. It is available in the menu under Chart exploration.
App consumers and viewers can use chart exploration to add or remove columns from a table, re-sort columns, change column width, and apply selections. You cannot change the size or layout of the entire table on the sheet in chart exploration mode.
Chart exploration mode is a great way to quickly remove or add data, and then share it, download it, or bookmark the new table state. It is very helpful in apps that have many viewers with different needs. The chart exploration panel is not shown in the resulting table that you have shared or downloaded.
If you customize a table using chart exploration mode, other users cannot see your changes, unless you save them as a public bookmark. This means that several users can alter the same table, at the same time. Your changes will remain visible to you if you refresh your browser page, but will be lost if you log out or your session times out. If this occurs, the table will return to its default state, as set by the person who created the straight table. If you want to save your table layout, create a bookmark. For more information, see Creating bookmarks.
Users with the ability to edit the sheet can make changes to the table using chart exploration, click Edit sheet, and save those changes to the original table.
App developers can turn on Chart exploration in the properties panel:
-
Enable chart exploration: Toggle this on to allow chart exploration.
-
Visibility option:
-
Auto: Chart exploration panel is visible when users open the sheet.
-
Minimized: Chart exploration is turned on, but not visible when users open the sheet. Users can open it in the hover menu by clicking and then Chart exploration.
-
For a table item to be available in chart exploration mode, the table creator (or a user who can edit the sheet) must have added those fields, master items, or expressions to the table as columns or alternative columns. For more information, see Working with table items.
Limitations
Chart exploration not available if table is embedded in certain charts
Chart exploration is not available if the table is embedded inside any of the following objects:
-
An existing container object that has not been replaced with a tab container. The tab container became the native container object in the November 2024 releases of Qlik Sense Enterprise on Windows and Qlik Sense Desktop.
Chart exploration is also not available in existing instances of the deprecated ShowHide container and Tabbed container objects. However, converting these objects to tab containers is not recommended. Instead, create a new tab container from scratch in order to access chart exploration in straight tables.
-
Trellis container
Number of rows displayed
If pagination is turned on, you can only display 100 rows at a time. If pagination is turned off, you can display up to 250 000 rows at a time. If your table has more than 250 000 rows, pagination will be applied.
Because huge tables are impractical and hard to manage, the limit for what is practical is far less than the theoretical maximum. In most cases, it is desirable to see all the columns without scrolling horizontally.
Accessibility
The straight table is only fully accessible if pagination if turned on. For more information on keyboard navigation, see Keyboard navigation and shortcuts.