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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
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

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine

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

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
pennetzdorfer
Creator III
Creator III
Author

Great workaround ... thank a lot, Ralf!

Regards,

Florian