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: 
Not applicable

Combing 2 fields data into one

Hi All,

I have the following table:

StudentId,MemberId

1,2

2,3

3,4

After loading it into the Memory, is it possible to let them into one field with expression not during the loading time period?

Thanks.

7 Replies
Anonymous
Not applicable
Author

As shown in the screenshot.

111.jpg

Is this what you are trying to accomplish?

Not applicable
Author

Hi,

In the expression of your list box or straight table or wherever you are planning to display it, you can use the following expression:

               =StudentID & ' ' & MemberID

sivarajs
Specialist II
Specialist II

SubField(StudentId&','&MemberId,',')

Not applicable
Author

What I want is use one field to show like:

The result is

1

2

3

4

instead of use comma to show them together.

er_mohit
Master II
Master II

TRY THIS

=concat( StudentId ,',')& ',' &Concat(MemberId,',')

Anonymous
Not applicable
Author

I don't think you can do that on expression level.

By the nature of QlikView, when you select a value, you select a value in a field. Merging two fields of data into one listbox just doesn't make sense -- when you select a value, which field is selected?

Doing this on load script level makes sense because you are basically creating a new field that contains all the data from both.

Not applicable
Author

try this

SubField(StudentId &','  & MemberId ,',' )

************************************************************

a:

LOAD * INLINE [

    StudentId, MemberId

    1, 2

    2, 3

    3, 4

];

LOAD StudentId as combined

Resident a;

LOAD MemberId as combined

Resident a;

DROP Table a;