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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Combine Two Records with different values into one record

Hey Guys:

I am having difficulties to combine two records into one in my script.

I am trying to do the following.

   

Original Load
ID_KEY1GenderValue
1234Male9
1234Male1

Solution

ID_KEY1GenderValue
1234Male10

Thanks,Branislav

4 Replies
maheshkuttappa
Creator II
Creator II

Hi, try group by

‌load

ID_KEY,

GENDER,

sum(value)

resident orginaltable group by ID_KEY,GENDER;

sunny_talwar

Mahesh's solution is correct, but make sure to use the correct casing because QlikView is case sensitive:

FinalTable:

LOAD ID_KEY1,

          Gender,

          Sum(Value) as Value

Resident Table

Group By ID_KEY1, Gender;

DROP Table Table;

sunny_talwar

This will also work:

Table:

LOAD ID_KEY1,

  Gender,

  Sum(Value) as Value

Group By ID_KEY1, Gender;

LOAD * Inline [

ID_KEY1, Gender, Value

1234, Male, 9

1234, Male, 1

];

Capture.PNG

Not applicable
Author

Thanks guys, I ended up doing exactly what you have proposed. It works great.