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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
adilio_silva
Contributor III
Contributor III

Custom Number Formatting Error - Symbols in Formatting String

Hello, Devs!

I'm getting values ​​divided by 100 when I change the formatting from A ('↑ #.##0,0%;↓ -#.##0,0%') to B ('#.##0,0% ↑;-#.##0,0% ↓').

I'm using the formula NUM(value, format).

Any suggestions?

Thank you for your attention!

Labels (1)
1 Solution

Accepted Solutions
Daniel_Castella
Support
Support

Hi @adilio_silva 

 

The issue here is that % needs to be the last symbol in the format. When it is the last symbol, Qlik multiplies x100 automatically. If % is not the last symbol, Qlik interprets it as a text and then it doesn't apply the x100.

 

For this reason, it seems it is dividing but, in reality, what it is doing is not multiplying x100 automatically as in format A. If you want to use format B, you need to add the x100 in the formula since Qlik will not apply it by default.

 

Other option is to add the arrow after the num() with an "&" but this will require an "if" function to determine when to point up and when down and it is not so fancy.

 

Kind Regards

Daniel

View solution in original post

3 Replies
marcus_sommer

You may do some trial & error - for example by removing the space for the arrow and/or replacing the space and the arrow with other chars. Take a look on the extended ASCII / UTF char-tables - there are various other arrow and space versions available. Another attempt may go to set also the optional third ZERO format with an own pattern + defining the second & third parameter of the num().

adilio_silva
Contributor III
Contributor III
Author

Marcus, thank you for your reply!

I tested all the variations (symbols, spaces) and didn't get a positive result.

I'll leave only the colors as a guide.

Apparently it's a "bug" or limitation of the function.

Daniel_Castella
Support
Support

Hi @adilio_silva 

 

The issue here is that % needs to be the last symbol in the format. When it is the last symbol, Qlik multiplies x100 automatically. If % is not the last symbol, Qlik interprets it as a text and then it doesn't apply the x100.

 

For this reason, it seems it is dividing but, in reality, what it is doing is not multiplying x100 automatically as in format A. If you want to use format B, you need to add the x100 in the formula since Qlik will not apply it by default.

 

Other option is to add the arrow after the num() with an "&" but this will require an "if" function to determine when to point up and when down and it is not so fancy.

 

Kind Regards

Daniel