EXACT DAX Function (Text)

Checks whether two text strings are exactly the same, and returns TRUE or FALSE. EXACT is case-sensitive.

Syntax

EXACT ( <Text1>, <Text2> )
Parameter Attributes Description
Text1

The first text string.

Text2

The second text string.

Return values

Scalar A single boolean value.

Remarks

An empty string and BLANK are considered the same value.

EXACT compares the two strings character by character. Uppercase and lowercase letters are different. Letters with and without accents, full-width and half-width characters, and leading or trailing spaces are also different. The = operator ignores the case and the width of the characters, but EXACT does not. If some of these differences must be ignored, use TRIM, UPPER, or LOWER on the arguments first.

If an argument is not text, DAX converts it to text before the comparison. For example, EXACT ( 1.5, “1.5” ) and EXACT ( TRUE, “TRUE” ) return TRUE, but EXACT ( 1.50, “1.50” ) returns FALSE because the number 1.50 becomes the text “1.5”. BLANK is not the same as “0”, and a space is not the same as an empty string.

» 4 related functions

Examples

--  EXACT performs string comparison in a case-sensitive way
--  By default, DAX is not case sensitive in comparison. 
--  EXACT can be useful to force case-sensitivity.
DEFINE
VAR A = "sqlbi"
VAR B = "SQLBI"
EVALUATE
    {
        ( "A = B", A = B ),
        ( "EXACT ( A, B )", EXACT ( A, B ) )
    }
Value1 Value2
A = B true
EXACT ( A, B ) false
--  EXACT compares two strings character by character.
--  The = operator ignores the case and the width of the characters,
--  whereas EXACT does not. Spaces and accents matter in both cases.
--  An empty string and BLANK are the same value also for EXACT.
DEFINE
    VAR FullWidthA = UNICHAR ( 65313 )      -- Full-width A
    VAR Cafe       = "caf" & UNICHAR ( 233 ) -- e with acute accent
EVALUATE
{
    ( "sqlbi, SQLBI",       "sqlbi" = "SQLBI",    EXACT ( "sqlbi", "SQLBI" ) ),
    ( "A, " & FullWidthA,   "A" = FullWidthA,     EXACT ( "A", FullWidthA ) ),
    ( "sqlbi, sqlbi + space", "sqlbi" = "sqlbi ", EXACT ( "sqlbi", "sqlbi " ) ),
    ( "cafe, " & Cafe,      "cafe" = Cafe,        EXACT ( "cafe", Cafe ) ),
    ( "empty string, BLANK", "" = BLANK (),       EXACT ( "", BLANK () ) )
}
Value1 Value2 Value3
sqlbi, SQLBI True False
A, A True False
sqlbi, sqlbi + space False False
cafe, café False False
empty string, BLANK True True

Related functions

Other related functions are:

Last update: Nov 18, 2026   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo

Microsoft documentation: https://learn.microsoft.com/en-us/dax/exact-function-dax

2018-2026 © SQLBI. All rights are reserved. Information coming from Microsoft documentation is property of Microsoft Corp. » Contact us   » Privacy Policy & Cookies

Context Transition

This function performs a Context Transition if called in a Row Context. Click to read more.

Row Context

This expression is executed in a Row Context. Click to read more.

Passed by Expression

This parameter is passed by expression and can be evaluated multiple times in different evaluation contexts.

Iterator

Not recommended

The use of this function is not recommended. See Remarks and Related functions for alternatives.

Not recommended

The use of this parameter is not recommended.

Deprecated

This function is deprecated. Jump to the Alternatives section to see the function to use.

Volatile

A volatile function may return a different result every time you call it, even if you provide the same arguments. Click to read more.

Deprecated

This parameter is deprecated and its use is not recommended.

DirectQuery compatibility

Limitations are placed on DAX expressions allowed in measures and calculated columns.
The state below shows the DirectQuery compatibility of the DAX function.

Contribute

Want to improve the content of EXACT? Did you find any issue?
Please, report it us! All submissions will be evaluated for possible updates of the content.