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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
manoranjan_d
Specialist
Specialist

clubiing the data as one field

Hi below is my example data,

                                    

DEPT
IT DeptCSE DeptECE DEPT
XXXX1XXXX1XXXX1
XXXX2XXXX2XXXX2
XXXX3XXXXXXXX3
XXXX4XXXX4XXXX4
XXXX5XXXX5XXXX5

I want the IT dept data to be clubbed with IT Dept,CSE dept data to be clubbed with CSE Dept,ECE dept data to be clubbed with ECE Dept.

all these three dept(IT,CSE,ECE) data to be clubbed as one field under "DEPT".

please help me on how to do it in load script.

6 Replies
robert_mika
Master III
Master III

Do you mean "merged"?

manoranjan_d
Specialist
Specialist
Author

yes

Not applicable

Hi Mano

try this in the script

[IT DEPT] & ' - ' & [CSE Dept] & ' - ' & [ECE DEPT] as DEPT

/Teis

stigchel
Partner - Master
Partner - Master

I think you can use a crosstable load, if I understood you correctly: (see also attached)

DEPT:

Load * Inline [IT_Dept,CSE_Dept,ECE_DEPT

XXXX1,XXXX1,XXXX1

XXXX2,XXXX2,XXXX2

XXXX3,XXXX,XXXX3

XXXX4,XXXX4,XXXX4

XXXX5,XXXX5,XXXX5

];

CrossTable(DEPT_Type, DEPT,1) load

RecNo() as ID,

IT_Dept as IT_Dept,

CSE_Dept as CSE_Dept,

ECE_DEPT as ECE_DEPT

resident DEPT;

robert_mika
Master III
Master III

t1:

load * inline

[

IT Dept, CSE Dept, ECE DEPT

XXXX1 ,XXXX1, XXXX1

XXXX2 ,XXXX2 ,XXXX2

XXXX3 ,XXXX ,XXXX3

XXXX4 ,XXXX4 ,XXXX4

XXXX5 ,XXXX5 ,XXXX5

]

;

t2:

load

[IT Dept] &[CSE Dept]&[ECE DEPT] as DEPT

Resident t1;

drop table t1

stigchel
Partner - Master
Partner - Master

Has this answered your question? If so, can you please close this thread by marking one of the answers correct? It will help others find a (correct) answer to similar problems and lets other contributing members know that this requires no more attention.