Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Not applicable

Error in expression:, is not a valid function Applymap Preceding Load

Appreciate the help!!!

Error in expression:, is not a valid function

Load *,

//vlookups

IF([Status]= 'Unauthorized',Applymap ('Losses',[ID],'N/A') +Applymap ('gains',[ID],'N/A'),0) as lookup;

Load

Status

Name

Number

Applymap ('Losses',[ID],'N/A') as Losses

Applymap ('gains',[ID],'N/A') as Gains

From

1 Solution

Accepted Solutions
Highlighted

Re: Error in expression:, is not a valid function Applymap Preceding Load

May be this:

IF([Status]= 'Unauthorized',Applymap ('Losses',[ID],Dual('N/A', 0)) + Applymap ('gains',[ID], Dual('N/A', 0)),0) as lookup;

View solution in original post

7 Replies
Highlighted
Esteemed Contributor III

Re: Error in expression:, is not a valid function Applymap Preceding Load

can u share that screen sht of error msg?

Highlighted
Esteemed Contributor

Re: Error in expression:, is not a valid function Applymap Preceding Load

Could you share your full script?

Why you are using this?

IF([Status]= 'Unauthorized',Applymap ('Losses',[ID],'N/A') +Applymap ('gains',[ID],'N/A'),0) as lookup;

Highlighted
Honored Contributor III

Re: Error in expression:, is not a valid function Applymap Preceding Load

It seems [ID] is not loaded in first load, if it is not, you cannot use in top load!

Highlighted

Re: Error in expression:, is not a valid function Applymap Preceding Load

May be this:

IF([Status]= 'Unauthorized',Applymap ('Losses',[ID],Dual('N/A', 0)) + Applymap ('gains',[ID], Dual('N/A', 0)),0) as lookup;

View solution in original post

Highlighted
Esteemed Contributor III

Re: Error in expression:, is not a valid function Applymap Preceding Load

Highlighted
MVP
MVP

Re: Error in expression:, is not a valid function Applymap Preceding Load

Digvijay is correct - the preceding load consumes the output of the following load, and ID is not part of that output, but the ApplyMaps are not required as you have them in the bottom load already.


Just use

LOAD *,

IF(Status = 'Unauthorized', Losses + Gains, 0) as lookup;

LOAD ...



Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Highlighted
Not applicable

Re: Error in expression:, is not a valid function Applymap Preceding Load

This was it and you saved my whole weekend!! thanks a million!!!!!!!