Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ddd111rgg23
Contributor III
Contributor III

crosstable

Hello,

 

I need to create a cross table in Qlik sense, Current table structure is below, 

 

Jul-24

Aug-24

Project Parameters

Program Parameters

 

Project Name

ABC

 

Project Number

123

 

 

 

and i want it to be like this:

Date

Project Name

Project Number

Jul-24

ABC

123

Aug-24

BC

456

 

Labels (4)
1 Solution

Accepted Solutions
Richard_Domingos
Contributor II
Contributor II

Hello!

I will ignore the first line, since its was not displayed on your result, and name the first collun as A.
Also populate the Aug-24 to show the result!

A

Jul-24

Aug-24

Project Name

ABC

DEF

Project Number

123

456

 

CrossTable is used to change colluns in lines, not lines in colluns.
the lines Project Name and Project Number can't be changed into colluns!

The closest result you'll get is:

A

DATA

TESTE

Project Name

Jul-24

ABC

Project Name

Aug-24

DEF

Project Number

Jul-24

123

Project Number

Aug-24

456

 

the code to achive that:

TMP:
LOAD * Inline
[
A,JUL-24,AUG-24
Project Name, abc, def
Project Number ,123 , 456
]
;

CrossTable(DATA,TESTE)
TESTE:
LOAD
A,
"JUL-24",
"AUG-24"

Resident TMP;

DROP Table TMP;

Don't forget to give credit! 😃

View solution in original post

2 Replies
Richard_Domingos
Contributor II
Contributor II

Hello!

I will ignore the first line, since its was not displayed on your result, and name the first collun as A.
Also populate the Aug-24 to show the result!

A

Jul-24

Aug-24

Project Name

ABC

DEF

Project Number

123

456

 

CrossTable is used to change colluns in lines, not lines in colluns.
the lines Project Name and Project Number can't be changed into colluns!

The closest result you'll get is:

A

DATA

TESTE

Project Name

Jul-24

ABC

Project Name

Aug-24

DEF

Project Number

Jul-24

123

Project Number

Aug-24

456

 

the code to achive that:

TMP:
LOAD * Inline
[
A,JUL-24,AUG-24
Project Name, abc, def
Project Number ,123 , 456
]
;

CrossTable(DATA,TESTE)
TESTE:
LOAD
A,
"JUL-24",
"AUG-24"

Resident TMP;

DROP Table TMP;

Don't forget to give credit! 😃

ddd111rgg23
Contributor III
Contributor III
Author

thank you so much 

 

but if i have changeable data , Load Inline will not work with that