Discussion board where members can get started with Qlik Sense.
I have two columns namely ZMERGE and SUBJECT GROUP. (table 1)
I have another table with ZMERGE values which refers to table 1 to give me subject group of the user: (table 2)
How do I, in the load script write in a value for SUBJECT GROUP call MULTIPLE_SUBJECTS so that for people like Frank (with multiple values in ZMERGE, they will have a proper value in SUBJECT GROUP?
(Also, the actual list is long so we can't just code in CH, LS, MD and PS).
Thank you in advance for all help!
Go to Solution.
This will create seperate rows for each ZMERGE that a NAME has in Table 2.
trim(subfield ( ZMERGE , ',' )) as ZMERGE
(html, codepage is 1252, embedded labels, table is @2);
From that yo should be able visualize it how yo wish.
LOAD * INLINE [
ZMERGE1, SUBJECT GROUP
LS, Life Sciences
MD, Medical Sciences
Load *,SubField(ZMERGE,',') as ZMERGE1;
Frank, "CH, LS, MD, PS"
drop Field ZMERGE from Table2;
That worked a treat! Thank you!
I'm just wondering though for people with a variety of multiple ZMERGE values, if i still want to have it labelled as MULTIPLE_SUBJECTS in SUBJECT GROUP, how do we do it?
Thank you for your help. However, I have a couple hundred of rows so I won't be able to list each row.
Subfield function works for N of values. would be able to share mock app and expected result. will check and help you. thanks Deva
Try using a Measure expression like this in your viz :
concat ( [SUBJECT GROUP] , ', ' )
Having just NAME as you Dimension
(html, codepage is 1252, embedded labels, table is @1);
TRIM(SubField(ZMERGE,',')) AS ZMERGE;
Thank you for this.
My initial thought was to have multiple ZMERGE values named as MULTIPLE_SUBJECTS.
In the end, subfield does the job pretty well (even better actually) to have the different subjects attributed to Frank.
Thanks alot for all your help and suggestions!