Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

Merge 2 fields

Hi all,

I need some help on merging 2 fields together. The 2 fields are both in the same table and one of the fields are created from a mapping load..

eg.

Table1:

Load    

     FieldA,

     FieldB,

     FieldC,

     applymap('FieldD',FieldA,'Unknown') as FieldE

From..

i want to combine the mapping field (FieldE) with FieldB

which would give me the following result.

If the values for FieldB are

Value1

Value2

Value3

and the values for FieldE are

Value4

Value5

Value6

Then i want the combined field to have the following values..

Value1

Value2

Value3

Value4

Value5

Value6

Does that make sense?

Many thanks

2 Replies
Gysbert_Wassenaar

Well, it doesn't make sense to me. Your explanation would lead me to do this:

NewFieldTable:

Load distinct FieldB as FieldNew

resident Table1;

Load distinct FieldE as FieldNew

resident Table1;

Which, I'm sure, is totally useless and not what you're looking for. Try posting a source table and the result table you expect.


talk is cheap, supply exceeds demand
Not applicable

As Mr. Wassenaar mentioned, reading the same table twice while naming the same field name for both FieldB and FieldE will be the answer.

Be careful not to read the other columns twice. Otherwise, the result of the calculation will differ from the actual numbers.


In addition, please see the attached file.

I put a straight table on dashboard and the sum(Sales) number on this table is correct.

However, if adding Product dimension into this table, total amount of Product column will be double of actual number.

You have to be very careful in expressions on each chart.

I think you better reading source data without changing the original structure if possible.


I am not sure this is what you want.