Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Highlighted
Qlik_SWO
New 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! 😊

 

1 Solution

Accepted Solutions
Rodrigo_Reis
New Contributor II

Re: Num# conversion not working (format code)

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

2 Replies
atoz1158
Contributor II

Re: Num# conversion not working (format code)

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
New Contributor II

Re: Num# conversion not working (format code)

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