English 中文(简体)
Qlikview Tutorial

QlikView Data Loading

QlikView Report Interface

QlikView Data Transformation

QlikView Data Model

QlikView Data Analysis

Qlikview Useful Resources

Selected Reading

QlikView - Cross Tables
  • 时间:2024-11-05

QpkView - Cross Tables


Previous Page Next Page  

While analyzing data, we come across situations where we desire columns to become rows and vice-versa. It is not just about transposing, it also involves rolpng up many columns together or repeating many values in a row many times to achieve the desired column and row layout in the table.

Input data

Consider the following input data, which shows region wise sales of a certain product for each quarter. We create a depmited file (CSV) with the below given data.

Quarter,Region1,Region2,Region 3
Q1,124,421,471
Q2,415,214,584
Q3,417,321,582
Q4,751,256,95

Loading Input Data

We load the above input data using the script editor, which is invoked by pressing Control+E. Choose the option Table Files and browse for the Input file. After choosing the options as shown below, cpck Next.

1_cross_tab_file_wizard

Crosstable Options

In the next window (File Wizard → Options), cpck on the Crosstable button. It highpghts the columns in different colors. The pink color shows the quapfier field, which is going to be repeated across many rows for each value of in the Attribute Field. The cell values under the Attribute fields are taken as the data. Cpck OK.

2_cross_tab_choose_fields

Crosstable Transformation

The transformed data appears in which all the Region fields are clubbed to one column but with values repeating for each quarter.

3_cross_tab_result1

Load Script

The Load script for the crosstable transformations shows the commands given below.

4_cross_tab_load_script

Crosstable Data

On creating a Table Box sheet object using the menu Layout → New Sheet Objects → Table Box, we get the following output.

5_cross_tab_table_box Advertisements