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

Need Help

Hi Community,

I have one requirement..

I have 2 tables

Table1:

ID, Value

100, 2500

200, 3000

300, 3500

Table2:

ID,  Value

100, 1000

200,  5000

300,  2500,

400,  4500

500,  2000

Here, ID values 100, 200, 300 are same but values are different..

I want to replace the Values in Table2.

My Output should be

Output:

ID, Value

100, 2500

200,  3000

300,  3500,

400,  4500

500,  2000

Thanks in Advance...

16 Replies
puttemans
Specialist
Specialist

Indeed, mapping selects only one of them, not both. So if you have in your table you're mapping a duplicate value, the mapping process is not optimal.

maxgro
MVP
MVP

with mapping if you have n records in Table2

you get the same number of record in output table

the requirement was to replace values in Table2, not to add records in Table2, so I think mapping works

qlikviewwizard
Master II
Master II

Hi

Please use the below script:

Table1:

LOAD * INLINE [

ID, Value

100, 2500

200, 3000

300, 3500

];

Table2:

LOAD * INLINE [

ID,  Value

100, 1000

200,  5000

300,  2500,

400,  4500

500,  2000]

Where Not Exists(ID)


Capture.JPG


paulwalker
Creator III
Creator III
Author

Thanks For reply EveryOne..

Table1:

IDCustomer
100Andy
101Sandy
102Luria
103Paul
104Ruzia

Table2:    

IDCustomer NameValue
100Andy20000
Andy2300
111Andy3400
200Ruzia1200
101Sandy2300
103Paul2300
123Paul2500
105Kanna12000

I have 2 tables, I want map ID to ID and Customer to Customer.

Suppose i have 2 List boxes 1. Customer and Customer Name

and TextBox=  Sum(Value)

If i am click Customer and Customer Name

It should be  Andy= 22300, because here compare  ID to ID and Customer to Customer.

Suppose Kanna= 12000  and paul=2300

Hope You Understand.......

paulwalker
Creator III
Creator III
Author

This is only for example,

but my source data many of Null (ID and Customer both)

Ralf-Narfeldt
Employee
Employee

I fail to see the use of Table 1, because the information is already in Table2.

Why do you need to link them?

Are Andy with  ID100 the same as Andy with ID 111?

paulwalker
Creator III
Creator III
Author

Yeah Ralf,

My data like that only..

I have most of the null values, even ID's and Customer Also....

I want to  get values from Table2, If i don't have any Common ID's also i want to get the data..