Table of contents
TOC
Collapse the table of content
Expand the table of content

CODE Function (DAX)

Owen Duncan|Last Updated: 10/5/2018
|
1 Contributor

Returns a numeric code for the first character in a text string. The returned code corresponds to the character set used by your computer.

Operating environmentCharacter set
MacintoshMacintosh character set
WindowsANSI

Syntax

CODE(text)  

Parameters

TermDefinition
textThe text for which you want the code of the first character.

Return Value

A numeric code for the first character in a text string.

Example

FormulaDescriptionResult
=CODE("A")Displays the numeric code for A65
=CODE("!")Displays the numeric code for !33
© 2018 Microsoft