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: 
cliff_clayman
Creator II
Creator II

ApplyMap functions on two different fields

I have two ApplyMaps that I am using to create a new field. The two ApplyMaps check for a value in the Supplier Number and Supplier Name field. Sometimes I do not always have a value in the number field, so I want to check the name field. I want to create a new field using these ApplyMaps, but I am not sure how to write it so that each ApplyMap checks against the proper field. 

The first ApplyMap looks like this:

ApplyMap('Supplier_NumberMapping'),[Supplier Number]

The second one looks like this:

ApplyMap('Supplier_NameMapping'),[Supplier Name]

 

I want to do something like this...

ApplyMap('Supplier_NumberMapping',[Supplier Number),ApplyMap('Supplier_NameMapping'),[Supplier Name] as ExceptionName

 

How do I format the above expression to work properly to create the new field?

Labels (1)
1 Solution

Accepted Solutions
devan9876
Creator
Creator

I would try

ApplyMap('Supplier_NumberMapping',[Supplier Number],ApplyMap('Supplier_NameMapping',[Supplier Name])) as ExceptionName,

 

OR

if(Not IsNull([Supplier Number]),
ApplyMap('Supplier_NumberMapping',[Supplier Number]),
ApplyMap('Supplier_NameMapping',[Supplier Name])
) as ExceptionName

View solution in original post

1 Reply
devan9876
Creator
Creator

I would try

ApplyMap('Supplier_NumberMapping',[Supplier Number],ApplyMap('Supplier_NameMapping',[Supplier Name])) as ExceptionName,

 

OR

if(Not IsNull([Supplier Number]),
ApplyMap('Supplier_NumberMapping',[Supplier Number]),
ApplyMap('Supplier_NameMapping',[Supplier Name])
) as ExceptionName