Crosstab

Use the crosstab layout to arrange data in rows and columns and summarize multiple value fields for easier comparison and analysis. If your dataset contains a category field along with multiple value fields, you can use the crosstab layout to organize the categories and measures in a matrix format.

The crosstab layout is useful for large datasets where a summarized view makes it easier to identify trends, relationships, and outliers without reviewing individual records.

Use cases#

Use the crosstab layout to:

  • Compare categories: Compare values across different categories, such as products, regions, or departments.
  • Analyze trends: Summarize values by date fields to identify changes over time.
  • Compare multiple measures: View several value fields together to compare metrics across categories.
  • Identify outliers: Quickly spot unusually high or low values in a summarized dataset.
  • Analyze relationships: Examine how different categories and measures relate to each other in a matrix view.
  • Summarize large datasets: Reduce a large number of records into a structured view for faster analysis.

Prerequisites

To enable the crosstab layout, make sure the table meets the following requirements:

  • Include an identity primary key.
  • Include a date or single-select column to assign to the Columns field.
  • Include at least one Required column, other than the primary identity key, to assign to the Rows field. The column must be configured as Required when the table is created.

You can configure the primary key as an Identity Column only when you configure the table, as shown in the following image.

Similarly, to configure a column as Required at the database level, select Required when you configure the table.

  • Crosstab layout does not work in tables with composite primary keys.
  • Crosstab layout is not supported for tables with type 2 and type 3 SCDs.

Create crosstab layout#

This section explains how to create the crosstab layout to organize and summarize data in a matrix format. In this example, you create a crosstab view for a Sales Performance table and organize sales data by category and date.

The sample table contains the following fields: Sales Entry ID, Category, Sales Date, Revenue, Cost, Profit, and Units Sold. You can organize Sales Date into a Year → Quarter → Month hierarchy and aggregate the value fields for comparison.

Tip#

Configure columns that you want to assign to the Values field as nullable so they can accept blank values.

In the PowerTable tab, select Layout > Crosstab. The Create Crosstab View window opens.

Assign fields#

Assign the required Rows, Columns, and Values fields to configure the crosstab layout.

Each field in the crosstab configuration determines how PowerTable groups, displays, or aggregates the data.

FieldPurpose
RowGroups data by categories, such as Product or Region.
ColumnGroups data by categories or time periods.
ValuesDisplays and aggregates the measures you want to summarize, such as Revenue or Cost.

To create the Sales Performance table by categories across the time period, assign the following columns to these fields:

Row: Category

Column: Sales_Date

Values: Profit, Units Sold

Configure column#

After selecting the columns in the Columns field, select the Settings icon next to it to configure the column hierarchy. Use the available options to define how you want to create, group, and display the hierarchy, as shown in the following image.

Interval Type

Use this option to select how you want to group the data in columns. Choose Date, Week, Month, Quarter, or Year to group the data by day, week, month, quarter, or year, respectively.

Start of the week

Select the day on which you want the week to start.

Select Range

Use the date picker to select the date range that you want to include and display in the crosstab layout. Both the dates and data outside this range aren't displayed.

Start of Financial Year

Select the month on which you want the financial year to begin in the layout.

Show Aggregated Values

Enable Show Aggregated Values to display the summarized value for the selected interval.

For example, when Interval Type is set to Quarter:

  • When enabled, PowerTable displays the aggregated value for all three months in each quarter, such as Q1, Q2, Q3, and Q4.
  • When disabled, PowerTable displays only the value from the first month of each quarter.

Editing data:

  • When Show Aggregated Values is enabled, PowerTable calculates aggregated values from the values at the lowest granularity level. To edit a value, drill down to the lowest level and enter the value.
  • When Show Aggregated Values is disabled, you can't drill down to the lowest level. Instead, enter the value directly in the cell for the selected interval, such as Q1.

To learn more, see edit cells and enter values.

Enable drill-down levels

Under Enable drill-down levels, select the levels that you want to display and navigate within the column hierarchy, such as Year, Quarter, Month, Week, and Date.

Based on the selected Interval Type, configure the level at which the hierarchy starts and the lower levels that users can navigate through. For example, if you select Month as the Interval Type, you can display Month directly or create a hierarchy such as Year → Month, Year → Quarter → Month, or Quarter → Month.

Drill-down settings

Select the Settings icon next to a drill-down level to specify its display format. For example, select YYYY or YY for years and MMM or MM for months.

Configure values#

Values are aggregated to Sum by default. To modify, select the vertical ellipsis (⋮) next to the required Values field and choose an aggregation type, such as Min, Max, Average, and Count. This action aggregates or summarizes the columns on each hierarchy.

Display subtotal and grand total#

Select the Settings icon next to the Values field, and then select or clear the options to show or hide Subtotals and the Grand Total.

Select Save. The crosstab layout is created as shown in the following image.

If the table is empty, navigate to a time range that contains data.

  • Use the Previous and Next arrows at the top to navigate through the timeline.
  • Select Today to navigate to the data in the current date.
  • Use the View as dropdown to choose the number of hierarchy levels to display at a time, such as Quarter or Year. The selected view applies only to the configured date range. Levels outside this range aren't displayed.
  • Use the arrows on column headers to expand or collapse hierarchies.

Insert row #

  1. Use Insert Row to add a new row category and enter values.
  2. After entering the values, select Save to Database. The table is updated.

Edit cells and enter values#

  1. Select a cell to edit its value.
  • When Show Aggregated Values is enabled, you see an Expand icon on the cell. Select it and start entering values in the cells at the lowest granularity level in the hierarchy.
  • When Show Aggregated Values is disabled, you can't drill down to the lowest level. Instead, enter the value directly in the cell for the selected interval. In the following image, you enter a value at the month level.
  1. Select Save and then Save to Datebase after entering necessary values. The crosstab automatically aggregates and writes back the values at the higher hierarchy levels.

The Crosstab layout doesn't distribute a value entered at an aggregated level across the lower levels. When you enter a value at an aggregated level, Crosstab stores it at the first period within the interval, which is the first date of the month in this example.

Search and sort data#

Use the toolbar to find and organize specific data.

  • Use Filter by keyword to search for text or numerical values in the table.
  • Select Sort By to sort rows by one or more columns.

Modify layout #

To modify the existing crosstab layout and configure a new one, go to Layout > Manage Layout. Select the layout, and then reset or reconfigure the properties.

Fabric Plan
Enterprise planning, Integrated with PowerTable and Intelligence, native to Microsoft Fabric. Co Engineered with Lumel.
BUILT ON