Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!

How to find a number for a char: chr() and ord() functions

cancel
Showing results for 
Search instead for 
Did you mean: 
SergeyMak
Partner Ambassador
Partner Ambassador

How to find a number for a char: chr() and ord() functions

Last Update:

Nov 30, 2022 1:19:23 AM

Updated By:

Sonja_Bauernfeind

Created date:

Apr 23, 2015 7:41:47 AM

Attachments

Everyone knows that sometimes we need to use chr() function to put paragraph sign - chr(13) – or single-quote - chr(39).

But sometimes you need a special symbol, but you don’t know the number. You can find it in the Internet, but I’ve found a Qlik way how to do it.

 

  • Just create a straight table.
  • Add Calculated Dimension =ValueLoop(1,100) or even =ValueLoop(1,10000)
  • Add Expression chr(RowNo())
  • And find a symbol that you need.

 

There is a faster way, If you found a symbol in the Internet and would like to know what is the number for this char.

For example delta sign

Δ

Use the ord() function

Ord(‘Δ’) gives you 916. So if you need to put this symbol somewhere you can use chr(916)

Some interesting codes are

 

=chr(9650) & chr(9651) & chr(9660) & chr(9661)

=chr(9733) and =chr(9734)

 

Be aware!

in the comments in different discussion jaimeaguilar mentioned that

"using chr() function you can display any ASCII / ANSI character (from chr 0 to 255) or Unicode chars (from chr 256 and up). The corresponding number in chr() function for the Unicode chars is the number referred as decimal, that can be found in plenty internet sites. Almost any Unicode char will display in ajax, but in some cases the correct displaying will depend on the page encoding."

Labels (1)
Comments
mato32188
Specialist
Specialist

Very simple and clever solution. Appreciate!

mithilesh17
Partner - Creator II
Partner - Creator II

Very interesting n dependable solution in tricky situations.. Thanks!

rteco0131
Contributor II
Contributor II

it's fantastic. Thanks!

Anil_Babu_Samineni

Good Job !!

But, I want to show like a square how to show that?

SergeyMak
Partner Ambassador
Partner Ambassador

Hi Anil,

to get to know you just need to use this solution.

Try to use =ValueLoop(1,10000) as a dimension and you will find the answer soon.

Regards,

Sergey

Anil_Babu_Samineni

Thanks, But bit difficult for me. I've posted on community, No one can resond that.

Date (Square) Problem

Anonymous
Not applicable

Muchas gracias

Anonymous
Not applicable

Thanks!  This is very helpful. 

Anonymous
Not applicable

This is great - it helped me find a way to add a colored arrow to a text box based on a calculation. 

Not applicable

Nice and simple. Very helpful.

Version history
Last update:
‎2022-11-30 01:19 AM
Updated by: