Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
QlikSensor
Partner - Creator
Partner - Creator

Pivot table with two columns on the left

Hi, we are used to ît from Excel: Having two columns on the left before the Pivot table starts.

There is a 1:1 relationship between two columns of my raw table. Let's say the first column is a unique number of a database and the second column is a unique descriptive field of that unique number. I want to show both columns right next to each other before the actual pivoting starts. I only managed in QlikSense to introduce the descriptive field as a dimension which leads to having the number field and the descriptive field below if I expand the number field (and even more worse I get two lines in the resulting pivot table).

I am wondering if it's possible to show the descriptive field right next to that number field?

10 Replies
Vegar
MVP
MVP

The syntax is 

crosstable (attribute field name, data field name [ , n ] ) ( loadstatement | selectstatement )

 

Imagine you have this data:

IDDescJanFebMarAprMayJun
AAdam456578127822
BBetty112322224585
CCaesar655622791256
DDavid452432785515
EEmmy455635786882
FFarhan577790249034
GGino233534345797
HHassan776834912468
IIda573644906727
JJesus576847908094

 

Then you could crosstable this data with the following statement:

crosstable (Month, Amount, 2) LOAD * from DataSource;

 

Read more on the Crosstable here: Crosstable - Qlik Sense

anushree1
Specialist II
Specialist II

Could you please attach a sample file
anushree1
Specialist II
Specialist II

Could you please attach a sample file

Vegar
MVP
MVP

Please find attached Qlik Sense application

image.png

QlikSensor
Partner - Creator
Partner - Creator
Author

Hm, as I can see you have created the Pivoting during reading the data and didn't use the Pivot-diagram but used a usual table. Am I right? Furthermore I can see that you already read in a pivot table. I am even more confused. This don't looks like that it solves my problem at least I can't see the solution...

QlikSensor
Partner - Creator
Partner - Creator
Author

Maybe I post an example table I read:

Unique Number       Unique Name      Month

0                                        Zero                          Jan

1                                        One                           Feb

2                                        Two                           Jan

0                                        Zero                           Jan

1                                        One                            Feb

2                                        Two                            Feb

This is the table I would like to create:

Unique Number    Unique Name               Jan       Feb

0                                     Zero                                 2             0

1                                     One                                  0             2

2                                     Two                                  1             1

What I get if I make Unique Name as a further dimension:

Unique Number/Unique Name           Jan    Feb

0                                                                         2          0

Zero                                                                  2          0

1                                                                         0          2

One                                                                   0          2

2                                                                         1          1

Two                                                                   1          1

Vegar
MVP
MVP

I'm also a bit confused 😕

You need help presenting data in a pivot table object in Qlik Sense?

How does your data look like inside Qlik Sense? Like the input or output of the data in my previous attached Qlik Sense  application? Could you provide a sample app/picture/description?

Do you need help in loading the data to fit your need or is ist only front end support for the use of pivot table object you are lookin for?

 

QlikSensor
Partner - Creator
Partner - Creator
Author

I did attach an example in my last post (unfortunately I edited the post and it says, it's visible after moderation 😞 Please wait some time until the example is visible. Sorry for the delay.

QlikSensor
Partner - Creator
Partner - Creator
Author

Ok, my edited post is now online.