Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

User-defined functions inside load script

Hi, Is this possible in QlikView?  I'd like to define a function that does some simple math

define addTheseForMe(int a, int b):

     return a+b;

MyTable:

LOAD if(ColA = x AND colB = y, addTheseForMe(ColA,ColY),null())

RESIDENT some_table;

1 Solution

Accepted Solutions
Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

Hi,

You can do:

SET addTheseForMe = $1 + $2;

MyTable:

LOAD if(ColA = x AND colB = y, $(addTheseForMe(ColA,ColY)),null()) 

RESIDENT some_table;

Regards,

Aurélien

Help users find answers! Don't forget to mark a solution that worked for you!

View solution in original post

1 Reply
Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

Hi,

You can do:

SET addTheseForMe = $1 + $2;

MyTable:

LOAD if(ColA = x AND colB = y, $(addTheseForMe(ColA,ColY)),null()) 

RESIDENT some_table;

Regards,

Aurélien

Help users find answers! Don't forget to mark a solution that worked for you!