Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Select a field from another table in load script

Hi guys,

I am trying to insert this if statement into my load script

(if(invoice_customer = [Customer Number],val)) as 'spend'

The problem I have is that the field [Customer Number] is held within a different table.  So when I try to load the script this fails because the field is not found.

Is there a way this can be done?

Thanks

16 Replies
buzzy996
Master II
Master II

first u have to execute Customers2 table and then u have to execute/load ur_second_table on the same applciation/qvw! --are u able to do this way???


u can share screenshot of ur error msg?

Anonymous
Not applicable
Author

Ok here goes;

This is the mapping load script

Capture1.PNG

This is where i am using the applymap

Capture3.PNG

This is shows you the tab orders

Capture3.PNG

This is the error I am getting

Capture4.PNG

buzzy996
Master II
Master II

okie,

r u having [Customer Name]  field information on ur dw_opsahistm.qvd file?

in custs2 table customer field having what kind of data,it's having customer names or customer ids?

Anonymous
Not applicable
Author

Sorry, I have just changed my screenshots above because i want to use customer number and not customer name.  I essentially would like to use the customer number field within the invoices table.  Customer number is the customer ID number

Hopefully this will then allow me to use the below calculation within the invoices load script

(if(invoice_customer = [Customer Number],val)) as 'spend'

Gabriel
Partner - Specialist III
Partner - Specialist III

Post a sample file (.qvw) with data for what you want to achieve

Anonymous
Not applicable
Author

Hi guys,

I finally got the applymap working but the figures came out wrong ! Haha

vardhancse
Specialist III
Specialist III

Once check the data in mapping table, the values should be unique