DAX Function Guide

CODE
Empty image or helper icon

Sam McKay

CEO & Founder

How does the CODE work?
The CODE function (DAX) will return a numeric value for the first character in a text string, which corresponds to a character set used by your computer.
CODE Formula Syntax

CODE(
     text
)

How do you use the CODE?

The CODE function is known as a text string used as a worksheet function in Excel. It can be entered as part of a formula in a cell of a worksheet.

Related Blog Posts

Loading

Considerations when using the CODE?

This function is used for the specified character to retrieve the ASCII value. If there is more than one character, the function will return the ASCII value for the first character and ignore all of the characters that come after the first.

Related Video Tutorials

Loading

Formula examples using the CODE

=CODE(“A”)

=CODE(“!”)

=CODE(A2)

Related Courses

Loading