Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Get dimension values in Pivot Chart Expression

I have a dataset with two dimensions

Dimension 1 = A  and It has values A1,A2, A3

Dimension 2 = B and it has values B1, B2

If I do a pivot chart using those two dimensions I would get something like this

B1B2
A1
A2
A3

In expression of that Pivot Chart, I want to refer to the Column Headers and Row Headers so that I can get something like this

B1B2
A1A1B1A1B2
A2A2B1A2B2
A3A3B1A3B2

Can you suggest how to refer to the column header in the expression?

19 Replies
vishsaggi
Champion III
Champion III

Add Pivot table and

Dimensions

A

B

Expression as

= A&B

Move your Dimension B on top of the expression.

Not applicable
Author

I appreciate your quick response.

What if I do pivot on same dimension e.g A? In this case how will A&A won't work. Is there a way to distinguish between first A and second A

      A1  A2  A3

A1

A2

A3

vishsaggi
Champion III
Champion III

I quite did not get you what you mean by A & A. One of the values in B is empty so it is displaying the Avalues with empty space.

What is that you are trying to achieve? Can you elaborate?

Not applicable
Author

the ultimate goal is to build a statistical model for correlation between different values of the same dimension.

Correl(A1, A2)

Correl (A1, A3).. etc

for that purpose, I am thinking of using the same dimension - A twice in the Pivot Chart.

      A1`  A2`  A3`

A1

A2

A3

then in expression part, I want to refer to the column header and Row header of that intersection and then calculate the correlation.

                 A1`                             A2`                   A3`

A1 Correl(A1, A1`)           Correl(A1, A2`)

A2

A3

albertovarela
Partner - Specialist
Partner - Specialist

By design you cannot have same dimension twice on the same chart (it can be done but you have to force it via calculated dimension)

vishsaggi
Champion III
Champion III

Click on Calculated dimension as Alberto suggested if you want to add same dimension twice. Like

= A

Not applicable
Author

I have already done that..

My question is  - how can you refer to the values of the first A and second A  in the expression of Pivot Chart

If I use Vishwarath's suggestion  of adding Expression = A&A

it doesn't work.

vishsaggi
Champion III
Champion III

Just label them differently. What is your expected output to be ?

sunny_talwar

Can you share an example where you use actual numbers instead of text?