Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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
sunny_talwar

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
Chanty4u
MVP
MVP

can u share that screen sht of error msg?

Anonymous
Not applicable
Author

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;

Digvijay_Singh

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

sunny_talwar

May be this:

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

Chanty4u
MVP
MVP

jonathandienst
Partner - Champion III
Partner - Champion III

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
Not applicable
Author

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