Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pivot table - expressions with different dimensions

Hi everbody,

I have to achieve a pivot table with four dimensions and two expressions. The problem I am facing is that I have to link expression 1 only with dimension 1 and 2, and expression 2 with all the four dimensions.

My aim is to obtain a table with the following layout:

Tab.jpg

How would you figure it out?

1 Reply
Not applicable
Author

Hi, I solved my issue creating a table in the script with dimension 3 and 4 as fields and using a single expression with if clauses for everything, like this:

LOAD * INLINE [

DIM_LEVEL01, DIM_LEVEL02, ORDER

A, X, 0

A, Y, 1

B, K, 2

B, W, 3

B, Z, 4

'','',5

];

Inside the unique expression, the result of expression1 is calculated when the if clause for DIM_LEVEL02 = '' is true. Later I placed DIM_LEVEL01 and DIM_LEVEL02 horizontally and kept blank their labels (the label of the expression as well).

Hope this solution will be useful to someone.

Cheers