Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Could anybody help me to correct my variable:
vRevenueTotalMax = sum({$<FYear = {$(=Max(FYear))}, OrderPhase_Desc = {Revenue}>} NettAmount$(vCurrency));
I would like to see the Revenue for the Maximum Year that I choose from a List box. But it´s not calculating anything.
It´s for sure something about brackets etc or similar...
Many thanks for your comments.
Best regards
Carolin
Hello together,
Many thanks for all of your help. All answers were helpful but I contacted our consultant in the meantime and got a solution. As you might be interested I post it here:
Possibility 1:
vRevenueTotalMax = 'sum({$<FYear ={' & chr(36) & '(=Max(FYear))}, OrderPhase_Desc = {''Revenue''}>} NettAmount$(vCurrency))';
Possibility 2:
let vRevenueTotalMax = 'sum({$<FYear ={' & chr(36) & '(=Max(FYear))}, OrderPhase_Desc = {' & chr(39) & 'Revenue' & chr(39) & '}>} NettAmount$(vCurrency))';
The reason seemed to be that for some reason inspite of the set statement Qlik View calculated the formula directly when running the script. This always caused an "internal error". So the solution was to use a let statement instead and link the part with "&" as you can see from above. Now I´m able to maintain these formulas in the script and use it for several charts.
Many thanks once more for all of your kind help.
Best regards,
Carolin