Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
pennetzdorfer
Creator III
Creator III

Strange num() Format Code behavior

Hello,

I've noticed a strange issue when using format codes in num() function:

num(SomeValue, '+#.##0; -#.##0; +/-0') doesn't work as supposed.

Please see the following discussion:

Re: Strange num() Format Code behavior

Regards,

Florian

Labels (3)
1 Solution

Accepted Solutions
rbecher
MVP
MVP

Hi Florian,

as a workaround you could use ASCII plus-minus sign:

     0xB1 or

     chr(177)

     =num(SomeValue, '+#.##0;-#.##0;±0')

..or a Unicode combination (my suggestion):

     U+207a (superscript plus sign) U+2044 (fraction slash) U+208b (subscript minus) or

     chr(8314) & chr(8260) & chr(8331)

     =num(SomeValue, '+#.##0;-#.##0;⁺⁄₋0')

Btw. I would omit the spaces in the format string.

- Ralf

Astrato.io Head of R&D

View solution in original post

2 Replies
rbecher
MVP
MVP

Hi Florian,

as a workaround you could use ASCII plus-minus sign:

     0xB1 or

     chr(177)

     =num(SomeValue, '+#.##0;-#.##0;±0')

..or a Unicode combination (my suggestion):

     U+207a (superscript plus sign) U+2044 (fraction slash) U+208b (subscript minus) or

     chr(8314) & chr(8260) & chr(8331)

     =num(SomeValue, '+#.##0;-#.##0;⁺⁄₋0')

Btw. I would omit the spaces in the format string.

- Ralf

Astrato.io Head of R&D
pennetzdorfer
Creator III
Creator III
Author

Great workaround ... thank a lot, Ralf!

Regards,

Florian