EXACT DAX Function (Text)
Checks whether two text strings are exactly the same, and returns TRUE or FALSE. EXACT is case-sensitive.
Syntax
| Parameter | Attributes | Description |
|---|---|---|
| Text1 |
The first text string. |
|
| Text2 |
The second text string. |
Return values
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.
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