Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Not applicable

problem with "num"

Hi!

I am trying to use the num function on a box object at the GUI, bu it keeps telling me that there is a ")" expected; I have checked it tons of times and it keeps poping out, could some one please help me out detecting the error??

=num((Sum(if(subfield(CATEGORIAS,'|',2)='R&D' and year=$(vYTDYear), CostoFinal))

/Sum(if(Accountlevel1TRM=4 and year=$(vYTDYear), CostoFinal))

*-1)*100

,$(v_num_format))

and the variable  v_num_format is: # ##0,0

Thank you in advance

Tags (3)
4 Replies
MVP & Luminary
MVP & Luminary

Re: problem with "num"

I think the reason is that your format-variable is a string and needs to be wrapped with single quotes. Therefore try:

=num((Sum(if(subfield(CATEGORIAS,'|',2)='R&D' and year=$(vYTDYear), CostoFinal))

/Sum(if(Accountlevel1TRM=4 and year=$(vYTDYear), CostoFinal))

*-1)*100

,'$(v_num_format)')

- Marcus

Not applicable

Re: problem with "num"

nop, didnt work

Not applicable

Re: problem with "num"

What I need is to format the number that I get with that to only two decimals, it doesnt need to be with a variable, do you know by any chance how else can I accomplish this?

Not applicable

Re: problem with "num"

I did it, the problem is with in the variable, the correct way to set it is: #,##0.00 no # ##0,0 . I was missing a "," and had misplaced the "."