Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
viveksingh
Creator III
Creator III

Replace Applymap with IF ELSE or CASE statement

Hi Experts,

I have a requirement like I want to convert the Qlik Data model into a query. since Qlik Doesn't gives a query, I manually trying to convert the existing script into a Query.

Now I got a requirement like Applymap needs to be replace with IF else or case statement.

if we have only one argument we in applymap we can simply write it. But i have nested applymap in nested If condition.

below is the code.

if(OPERATING_UNIT_NAME = 'Grafton OU',

ApplyMap('CDBGBusinessUnitMap', Num#(CUSTOMER_TRANSACTION_NUMBER) ,

       If(BATCH_SOURCE_NAME = 'PROJECTS INVOICES' AND NOT(IsNull(ACCT_BU)), ApplyMap('TaskOrgBUMap', ACCT_BU, ACCT_BU), ApplyMap('BusinessUnitMapInvoice',BusinessUnitID, 'Other'))),

If(BATCH_SOURCE_NAME = 'PROJECTS INVOICES' AND NOT(IsNull(ACCT_BU)), ApplyMap('TaskOrgBUMap', ACCT_BU, ACCT_BU), ApplyMap('BusinessUnitMapInvoice',BusinessUnitID, 'Other'))

)

Please help me on this.

1 Reply
RonaldDoes
Partner - Creator III
Partner - Creator III

Wouldn't an ApplyMap be best described as an ordinary join in most other languages?