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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
risabhroy_03
Partner - Creator II
Partner - Creator II

Table Source

I have an ApplyMap statement that tells me the Supplier name.

So, basically, my Applymap gives me data from a mapping table and if the data is not found then it goes to table B and directly picks the data.

I want a new column that tells me from which table the Supplier name is coming.

Can anyone help me out?

Below is my Mapping Table (A)

risabhroy_03_0-1653646884393.png

 And below is my table B

risabhroy_03_1-1653646911662.png

And this is my Applymap statement

risabhroy_03_2-1653646937055.png

 

Labels (1)
3 Replies
justISO
Specialist
Specialist

Hi, maybe just add additional row for 'flag' in both load scripts, for example:

'map' as flag

in mapping table so your loading script part will look like this:

[Map_Supplier]:
Mapping
Load
...
"T$OTBP" as [OTBP_010]
'map' as flag
FROM [$(v...

 

and add

'table' as flag

in table B loading script

risabhroy_03
Partner - Creator II
Partner - Creator II
Author

No it will not work because it gives an error - Mapping table can have exactly 2 fields.

vinieme12
Champion III
Champion III

Syntax as below

 

If(Len(applymap('mappingtable',key,null())),'FromMappingTable','MainTable') as SupplierSource

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.