Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
May 18th 10AM ET, Live Chat, bring your QlikView questions. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
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

4 Replies
marcus_sommer
MVP & Luminary
MVP & Luminary

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
Author

nop, didnt work

Not applicable
Author

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
Author

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 "."