Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Qlik_SWO
Contributor
Contributor

Num# conversion not working (format code)

Hi,

I need to convert the following Strings to Numbers:

Unbenannt.PNG

I also want to remove the decimal place after the "," (It is always 000)

For the thousands separator, i want to show a comma instead of the "."

Example: Current String: 80.000,000 --> Expected Number: 80,000

Example 2: Current String: 200,000 --> Expected Number: 200

As I tried to understand, the right way to do this is something like that in the loading script :

Num#(CURRENTMAX,'#.#', ',', '.') as NEUMAX

I understood that the '#' operator denotes a possible digit to the left of the decimal point.
What is the right format code to get things working?

Thanks in advance! 😊

 

Labels (5)
1 Solution

Accepted Solutions
Rodrigo_Reis
Contributor II
Contributor II

You can adjust with the num function, but note that this is a mask:
=num(num#(CURRENTMAX, '#.## 0,000', ',', '.'), '#,##0')

You can also round off the number to make the decimal places disappear:
=floor(num#(CURRENTMAX, '#.##0,000', ',', '.'))
After this you apply num function

View solution in original post

2 Replies
atoz1158
Creator II
Creator II

Hi

If you are sure that your input is going to be in the format shown you could try the following

 

Replace(Replace(CURRENTMAX,',000',''),'.',',') ) as NEUMAX

 

Regards

Adrian

Rodrigo_Reis
Contributor II
Contributor II

You can adjust with the num function, but note that this is a mask:
=num(num#(CURRENTMAX, '#.## 0,000', ',', '.'), '#,##0')

You can also round off the number to make the decimal places disappear:
=floor(num#(CURRENTMAX, '#.##0,000', ',', '.'))
After this you apply num function