Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
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

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