Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
SBartschat
Contributor II
Contributor II

Applymap as parameter in a Variable

Hi there,

 

iam trying to do a repetive calculation in the loadscript for several tables via a variable with Parameters in Qliksense Desktop. This works perfectly until i try to insert a parameter as Applymap:

 

The Variable:

set vGRUNDFIXBONUS1=if($1='x',

if(
isnull($2),
$3*$4,
if(
$3 > $2,
$2,
$3*$4
)
),null()
);

 

 

The call in the loadscript:

$(vGRUNDFIXBONUS1(
hat_Grundfixbonus_1,
"Grund / Fixbonus 1 Obergrenze","Grund / Fixbonus 1",
ApplyMap('Mapping_Umsatz_Haus', "GP.-Nr",0)
))

as "Result",

 

Error Message:

 

Error in expression: ApplyMap takes 2-3 parameters

 

It seems that the Parameters 'Mapping_Umsatz_Haus', "GP.-Nr",0 are not recognized by the compiler.

 

Does anyone have a solution for this problem?

 

Thank you in advance!

Labels (3)
1 Solution

Accepted Solutions
Gysbert_Wassenaar

Not quite. What happens is that your variable takes parameters separated by comma's. The comma's inside the Applymap function are treated as parameter separators for the variable parameters instead of for the applymap function. What you should do is apply the ApplyMap function first and put the result in a temporary field. Then use a preceding load in which you use your variable. Instead of inputting the ApplyMap function as a paramter you input the temporary field.


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

Not quite. What happens is that your variable takes parameters separated by comma's. The comma's inside the Applymap function are treated as parameter separators for the variable parameters instead of for the applymap function. What you should do is apply the ApplyMap function first and put the result in a temporary field. Then use a preceding load in which you use your variable. Instead of inputting the ApplyMap function as a paramter you input the temporary field.


talk is cheap, supply exceeds demand
SBartschat
Contributor II
Contributor II
Author

This was the solution for my Problem.

 

Thank you very much.