OpenBI Docs Buy

UNICHAR

The character of a Unicode code point.

Group: Text. Compatible with DAX.

Syntax

UNICHAR ( <number> )
ParameterTypeDescription
numberWhole numberThe character's Unicode code point, from 1 to 1114111.

Returns

Text. The character with that code point.

Remarks

  • A fraction is rounded: UNICHAR ( 65.6 ) is B.
  • Control characters below 32 are an error, except tab (9), line feed (10) and carriage return (13). Code points that are not characters, such as 55296, are errors too.
  • A blank gives BLANK.
  • It brings symbols into a measure or a label without typing them: ★ is 9733, ☆ 9734, ▲ 9650 and ▼ 9660.
  • UNICODE goes the other way.

Examples

Characters by number

EVALUATE
ROW ( "9733", UNICHAR ( 9733 ), "65", UNICHAR ( 65 ), "216", UNICHAR ( 216 ), "Blank", UNICHAR ( BLANK () ) )
973365216Blank
★AØ(blank)

A rating with stars

EVALUATE
ROW ( "Rating", REPT ( UNICHAR ( 9733 ), 3 ) & REPT ( UNICHAR ( 9734 ), 2 ) )
Rating
★★★☆☆

Arrows for up and down

EVALUATE
VAR Change = DATATABLE ( "Product", STRING, "Change", DOUBLE, { { "Pils", 0.04 }, { "Cider", -0.02 } } )
RETURN
    ADDCOLUMNS ( Change, "Arrow", IF ( [Change] >= 0, UNICHAR ( 9650 ), UNICHAR ( 9660 ) ) )
ORDER BY [Product]
ProductChangeArrow
Cider-0.02▼
Pils0.04▲

UNICODE, REPT, CONCATENATE.

Last updated · OpenBI Studio 0.3.74