Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey,
I need to do bellow calculation in load script. But I have issue with syntax.
LET vIndirect = '14719,65';
LET vPakA = '19234,77';
LET vPakB = '18793,12';
LET vSortA = '15199,00';
LET vSortB = '19755,00';
LET vPRC_CST_0001X = ((vIndirect + (RANGEAVG(vPakA, vPakB) + RANGEAVG(vSortA, vSortB)) / '20.8') / '50');
You couldn't calculate with strings. Further some numbers are wrongly specified with a comma. Also it's best practice to use a $-sign expansion by a variable-call. Therefore it may look like:
SET vIndirect = 14719.65;
SET vPakA = 19234.77;
SET vPakB = 18793.12;
SET vSortA = 15199.00;
SET vSortB = 19755.00;
LET vPRC_CST_0001X = (($(vIndirect) + (RANGEAVG($(vPakA), $(vPakB)) + RANGEAVG($(vSortA), $(vSortB))) / 20.8) / 50);
Hi,
I believe you only need the ' when setting a string so i would remove them as start.
LET vPRC_CST_0001X = ((vIndirect + (RANGEAVG(vPakA, vPakB) + RANGEAVG(vSortA, vSortB)) / 20.8) / 50)
You couldn't calculate with strings. Further some numbers are wrongly specified with a comma. Also it's best practice to use a $-sign expansion by a variable-call. Therefore it may look like:
SET vIndirect = 14719.65;
SET vPakA = 19234.77;
SET vPakB = 18793.12;
SET vSortA = 15199.00;
SET vSortB = 19755.00;
LET vPRC_CST_0001X = (($(vIndirect) + (RANGEAVG($(vPakA), $(vPakB)) + RANGEAVG($(vSortA), $(vSortB))) / 20.8) / 50);