Power Pivot Principles: The A to Z of DAX Functions – EXACT
26 September 2023
In our long-established Power Pivot Principles articles, we continue our series on the A to Z of Data Analysis eXpression (DAX) functions. This week, we look at EXACT.
The EXACT function
The EXACT function is one of the text functions where it compares two text strings and returns TRUE if they are exactly the same, otherwise returns FALSE. The EXACT function is case-sensitive, but it ignores any formatting differences. It employs the following syntax:
EXACT(text1, text2)
It has two [2] arguments:
- text1: this is required and, this represents the first text string or column that contains text
- text2: this is required and, this represents the second text string or column that contains text.
Let’s consider the following example here where we have the following Random_Number table:
Let’s ignore the ‘Row no.’ field for now as we will use it later in the PivotTable to view all entries here. We have two [2] columns, A and B here. The number three [3] on the first [1st] row is a number whilst the number three [3] on the second [2nd] row is text. We will write an EXACT function here to generate the Boolean list where the exact match occurs:
We have to use the MAX function here to aggregate columns A and B so that the EXACT function reads properly. Then, we will put the new measure in the Values field in the PivotTable and the ‘Row no.’ column in the Rows field of the PivotTable:
Since the EXACT function is case sensitive, the third and sixth rows result in FALSE values whilst the rest of the table has TRUE values.
Come back next week for our next post on Power Pivot in the Blog section. In the meantime, please remember we have training in Power Pivot which you can find out more about here. If you wish to catch up on past articles in the meantime, you can find all of our Past Power Pivot blogs here.