Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Number Format

Hi

I am trying to convert these amounts to money by choosing 'Money' in Number tab in chart properties. Only some of the amounts are getting converted to money while the rest are not. I realized that the numbers having a 'comma' are the ones not getting converted to money. How do I solve this? Please Help.

df.png

1 Solution

Accepted Solutions
marcus_sommer

It looked that you have a mix of numeric- and string-values in your dimension. In this case you need to make sure that all your values are numeric - this could be done in script by using num#(yourvalue, 'YourFormat') maybe within an if-loop to catch the differences of all their values.

- Marcus

View solution in original post

5 Replies
swuehl
MVP
MVP

Double check the formats of your number separators at the beginning of your script:

SET ThousandSep=',';

SET DecimalSep='.';

If your numbers are parsed correctly, all values should be right aligned in a list box by default.

marcus_sommer

It looked that you have a mix of numeric- and string-values in your dimension. In this case you need to make sure that all your values are numeric - this could be done in script by using num#(yourvalue, 'YourFormat') maybe within an if-loop to catch the differences of all their values.

- Marcus

Not applicable
Author

Hi Chandni, I think that this happens because some numbers are strings.

So, first of all, convert the strings to numbers and then apply the money format.

To convert strings to number apply this function:

num(Num#([YOUR_VALUE],'###,###.####','.',','),'###,###.##')


I hope that it help you,


Regards,


Agustín

Anonymous
Not applicable
Author

Thank You!

Anonymous
Not applicable
Author

Thank You!