Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

How to use Unicode with the Repeat Function

Patric Nordström presented this in his tips & tricks from 2019, and I was wondering

I can change his code from:

Repeat('▮',round(sum(Sales)/max(total aggr(sum(Sales), CategoryName))*10))

to

Repeat('💍',round(sum(Sales)/max(total aggr(sum(Sales), CategoryName))*10)) and it works.

But what if I only had the unicode?  How do I put that into the original line of the expression?  

U+1F48D

Thank you in advance,

 

Cheryl

1 Solution

Accepted Solutions
Highlighted
Employee
Employee

Re: How to use Unicode with the Repeat Function

You can use the CHR() function in combination with the Unicode point number.

In this case 
💍128141

So in your case it would be:

Repeat(chr(128141),round(sum(Sales)/max(total aggr(sum(Sales), CategoryName))*10))

 

On most reference sites, the unicode point number is listed under "HTML code" or "HTML entity", but all you need is the integer number. 
https://unicode-table.com/en/1F48D/

CHR function:
https://help.qlik.com/en-US/sense/latest/Subsystems/Hub/Content/Sense_Hub/Scripting/StringFunctions/...

You can discover the unicode point number of a symbol by using the ORD() function:
https://help.qlik.com/en-US/sense/latest/Subsystems/Hub/Content/Sense_Hub/Scripting/StringFunctions/...


View solution in original post

4 Replies
Highlighted
Employee
Employee

Re: How to use Unicode with the Repeat Function

You can use the CHR() function in combination with the Unicode point number.

In this case 
💍128141

So in your case it would be:

Repeat(chr(128141),round(sum(Sales)/max(total aggr(sum(Sales), CategoryName))*10))

 

On most reference sites, the unicode point number is listed under "HTML code" or "HTML entity", but all you need is the integer number. 
https://unicode-table.com/en/1F48D/

CHR function:
https://help.qlik.com/en-US/sense/latest/Subsystems/Hub/Content/Sense_Hub/Scripting/StringFunctions/...

You can discover the unicode point number of a symbol by using the ORD() function:
https://help.qlik.com/en-US/sense/latest/Subsystems/Hub/Content/Sense_Hub/Scripting/StringFunctions/...


View solution in original post

Highlighted
Specialist III
Specialist III

Re: How to use Unicode with the Repeat Function

Thanks for the information @QlikTom 

Highlighted
Creator
Creator

Re: How to use Unicode with the Repeat Function

Thank you Qliktom!

Highlighted
Employee
Employee

Re: How to use Unicode with the Repeat Function

One more bit of relevant information. Whenever you see a unicode symbol/emoji it is typically listed in hexadecimal like so:

U+1F48D

If you parse out the section after "U+" you will find this is just a hexadecimal number. This can be converted to the decimal number you need on any number of websites or even with the windows calculator in "Programmer" mode.

Example:

2020-06-30_9-43-50.png