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: 
russell_angus
Contributor
Contributor

Crosstable question

I have a table in excel which has one dimension as the rows, and another dimension as the columns. The data values are all either true or false.

E.g.

          Dim2

Dim1     X     Y     Z     and so on...

A         T     F     F

        F     T     F

C         F     T     T

and so on...

So far so good...

When I use the crosstable function in the load statement it includes the first column header as one of the data values, in my example above the X.

What I want is:

Dim1     Dim2     Data

A          X          T

A          Y          F

A          Z          F

etc

Can anyone help?

3 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Try this way.

DATA:
Load * inline [
Dim1,X,Y,Z
A,T,F,F
B,F,T,F
C,F,T,T
];


CrossTable (Dim2,Value,1)
Load Dim1,
  X,
  Y,
  Z
Resident DATA; 

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable

Temp:
Load * inline [
Dim1,X,Y,Z
A,T,F,F
B,F,T,F
C,F,T,T
];


CrossTable (Dim2,Value,1)
Load Dim1,
  X,
  Y,
  Z
Resident Temp; 

er_mohit
Master II
Master II

see the attached file

output this

Dim1Dim2Data
AXT
AYF
AZF
BXF
BYT
BZF
CXF
CYT
CZT