Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How convert string to number for sum()

Hi every body! I

I need your help for this issue..

I got the field "COSTO_TOTAL_OBRA.RPM_ITEM_D" with the values 20 and 29.670,00 but when I do the sum(): sum(COSTO_TOTAL_OBRA.RPM_ITEM_D) the result is: 20 (Object text in the image)

I think that the trouble is that "29.670,00" its a string in place of number, but I don't know how convert this string to number and that then the app shows me the correct result (29.690,00)

I attach the script!

Duda.png

Thanks in advance!

Agus

3 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Try this,

=num(Num#(COSTO_TOTAL_OBRA.RPM_ITEM_D,'#.###,##',',','.'))

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Thanks a lot Kaushik !

Not applicable
Author

Hi, i supose that your problem is in the separators.

See that you amount is the point (.) and the decimal separator is comma (",").

See example below:

Sumatoria:

LOAD sum(Codigos) as Codigos

FROM

(ooxml, embedded labels, table is Sheet1);

Sum.PNG