Summarizing data with a Cross Tab
The Cross Tab presents multi-dimensional data in a highly customizable pivot table structure. Cross Tabs include auto-calculated totals for single dimensions, multiple dimensions, and across the entire table, making it a great way to summarize data. When you add a Cross Tab, you can configure specific parts of the table by selecting one of the cell objects individually.
Cross Tab in a PixelPerfect report

Requirements
The data you use for a Cross Tab has to be added as a table data binding. To create this type of data binding, use the Field List menu and add an item under Tables.
Creating a Cross Tab
执行以下操作:
-
Open the
Field List menu available from the right-side panel in the designer.
-
Click the plus icon next to Tables.
-
From the available sheets, select the Qlik Sense chart you want to add as a table. Click the
icon next to it.
The data binding is added.
-
From the toolbox panel on the left side of the designer, drag a
Cross Tab onto the design surface.
-
Click the gear icon that appears next to the Cross Tab. In the pop-up menu, for Data Member, select the table data binding you created earlier.
-
Open the
Properties menu from the right side of the designer, and expand Data.
-
Expand Row Fields, and click the plus icon. For Field Name, select a field to use for the rows in the Cross Tab. This is similar to adding dimensions in a pivot table.
You can add more than one row field by clicking the plus icon again and repeating this process.
-
Expand Column Fields, and click the plus icon. For Field Name, select a field to use for the rows in the Cross Tab. This is similar to column field definitions in pivot tables.
You can add more than one column field by clicking the plus icon again and repeating this process.
-
Expand Data Fields, and click the plus icon. For Field Name, select a field to use for a variable metric you want to show (for example, total sales). This is similar to adding measures in a pivot table.
You can add more than one data field by clicking the plus icon again and repeating this process.
-
As needed, to achieve the desired presentation, configure the properties for the following report elements:
-
Each of the individual cells in the Cross Tab
-
Global settings for the entire report
-
The band in which you placed the Cross Tab
For further guidance, see Additional tips for configuring Cross Tabs.
-
Additional tips for configuring Cross Tabs
The above workflow shows you how to create a Cross Tab and connect it to data sources from the Qlik Sense app. Here are some extra tips to help you make the most out of the Cross Tab.
Optimizing space and content splitting
Before you start creating your Cross Tab, you should know what information you want to present. Attempting to present too much information in the Cross Tab can lead to results that are cluttered, overwhelming, and even confusing.
If you add too many columns or rows to the Cross Tab, it might not be possible to display all content without splitting some content onto new pages.
Still, it is often possible to optimize the Cross Tab to present your content in a neat, efficient fashion.
Column auto-width and row auto-height settings
You can drag individual cells in the Cross Tab to set width and height. However, you can configure additional properties for each cell to allow automatic adjustments in case actual cell content causes issues during report generation (for example, a certain Product Category name is much longer than others).
执行以下操作:
-
Click on a specific cell in the Cross Tab.
-
Open the
Properties menu from the right side of the designer.
Each property can be set to one of the following:
-
Adjust the settings for Column Auto Width Mode and Row Auto Height Mode. Each property can be set to one of the following:
-
None: The column or row will not grow or shrink to best match the needed size for the values in it.
-
Grow Only: The column or row will be expanded if it helps match the needed size for the values in it. It will not be reduced in size.
-
Shrink Only: The column or row will be reduced in size if it helps match the needed size for the values in it. It will not be expanded.
-
Shrink and Grow: The column or row will be reduced in size and/or expanded if it helps match the needed size for the values in it.
Certain cells in the Cross Tab structure inherit their settings from other cells.
-
Content splitting settings
It can happen that you need to add more information to your Cross Tab than can be displayed within a single-page table template. You can configure your global report settings so that content is split without creating partial columns and rows.
执行以下操作:
-
In the designer, click in the blank space outside the design surface.
-
Open the
Properties menu from the right side of the designer. These are the properties for the entire report.
-
Expand Behavior.
-
Adjust the settings for Vertical Content Splitting and Horizontal Content Splitting. Each property can be set to Exact or Smart.
When the Smart setting is used, when content exceeds the amount of available space for a page, it is split so that the entire row or column is moved to a new page. This prevents partial column or rows when content needs to be split across multiple pages.
Editing the properties for an entire Cross Tab
During the process of creating a Cross Tab, you might have to edit the properties of a single cell, the report, or a band. To return to editing the properties for the entire Cross Tab, click outside the Cross Tab and drag your cursor over it until the entire object is selected.
Refreshing source data for data bindings
随着时间的推移,源图表的配置可能会发生变化,需要在 PixelPerfect 报告模板中采取行动。您可以在定义交叉表的数据绑定中刷新源应用程序数据。这在以下情况下很有用:
-
自创建数据绑定以来,维度和度量已添加到源图表或从源图表中删除。
-
自创建数据绑定以来,源图表中的维度和度量的定义已更改。
刷新数据绑定源允许您在 字段列表菜单中保留相同的对象,而无需在图表配置更改时创建新的对象。
执行以下操作:
-
打开设计器右侧面板中可用的
字段列表菜单。
-
双击表格将其展开。
-
将光标悬停在要刷新的项目上。
-
单击刷新(更新列)图标。
刷新 字段列表菜单中的表格数据绑定

-
根据您的用例继续进行模板开发。这可能涉及重新配置现有内容或添加新内容。刷新数据绑定后,新添加的图表列现在可以从
字段列表菜单中使用。
Example
请参阅此处的应用程序源示例:示例材料 - 应用程序中报告。上传应用程序和数据文件到空间,然后重新加载应用程序。即可完成示例。
In this example, we create a Cross Tab with a breakdown of sales by region, product, and region. Grand totals for each dimension, and across all data, are calculated and displayed.
Part 1: Add data binding and Cross Tab
执行以下操作:
-
Create a new PixelPerfect template.
-
Open the
Field List in the designer.
Field List menu in the PixelPerfect designer

-
Click the plus icon next to Tables.
-
Expand the Sales Tables sheet, and click the
icon next to the Sales Details 2021-2023 chart.
The data binding is added.
-
From the toolbox panel on the left side of the designer, drag a
Cross Tab onto the Detail1 band. Align it in the top left corner of the band.
Blank Cross Tab added to template. The image also shows the data source that will be used to bind to the Cross Tab.

Part 2: Connect the Cross Tab to data binding
执行以下操作:
-
Open the
Properties menu from the right side of the designer.
-
Under Cross Tab Tasks > Data Member in the menu, select the Sales Details 2021-2023 table.
-
Expand Data.
-
Expand Row Fields, and click the plus icon.
-
Expand the new Column Field you created.
-
For Field Name, select the Product Group field.
-
Click the plus icon next to Row Fields a second time, and then expand the new Row Field.
-
For Field Name, select the Region field.
-
Expand Column Fields, and click the plus icon.
-
Expand the new Column Field you created.
-
For Field Name, select the Year field.
-
Expand Data Fields, and click the plus icon.
-
Expand the new Data Field you created.
-
For Field Name, select the Sales field.
Cross Tab after it has been connected to a data binding

Part 3: Refine the presentation
The data structure has been defined. Now we want to fine-tune its appearance.
We want to configure the format of numbers to reflect that they represent currency. Select the cell showing [Sales], and click the gear icon that appears next to it.
Under Text Format String, enter the following:
{0:$ #,#0.00}Repeat this process for the other five cells that will contain sales values when the report is generated.
Next, you can adjust properties at the Cross Tab level, and for each cell in the Cross Tab.
Here are some examples of properties that were modified to produce the report below:
-
Column Auto Width Mode
-
Row Auto Height Mode
-
Border
-
Background Color
-
Font
-
Padding
-
Text Alignment
As you work, you can change the height and width of each cell in the Cross Tab.
Run previews to check the effects of your changes.
Report preview for Cross Tab example
