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: 
Raju_6952
Creator III
Creator III

Seperate column for each employeeID column

Hi all,

 

i am exploring a ways to extract the employee Id as sperate column for one of my requirement.

input data and output has been attached in the image below.

 

Raju_6952_0-1746538525700.png

is there any other options expect subfield to extract as a separate field and use it as a sperate column and curious if we can use any dynamic expression to get the same output.

 

Thanks in Advance.

Regards,

Raju

 

Labels (1)
  • SaaS

3 Replies
VBD
Partner - Creator II
Partner - Creator II

marcus_sommer

It couldn't be done within the UI but easily in the script by using subfield() to transform the strings into separate records and then a generic-load could be used to create such crosstable (you should have very strong reasons to build such data-structures because crosstables are quite unhandy).

ali_hijazi
Partner - Master II
Partner - Master II

the following script accomplishes your requirement:

Test:
Load *, index(replace(Attribute,',',''),value) as index;
Load text(EmployeeID) as EmployeeID,text(EmployeeID) as Attribute, text(subfield(EmployeeID,',')) as value;
Load * Inline [
EmployeeID
1
2,3,4
5,6,7
]
(delimiter is ';');


Generic Load EmployeeID, index ,value Resident Test;
drop table Test;

ali_hijazi_0-1746618247576.png

 



I can walk on water when it freezes