Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
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.
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.
This was the solution for my Problem.
Thank you very much.