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
