Power BI April 5, 2025 · 1 min read

Using DAX Visual Calculations to compare text values in Power BI

Visual calculations offer a fast, simple way to compare text values across millions of rows without the performance cost of measures or calculated columns.

Gregor Brunner Gregor Brunner
Using DAX Visual Calculations to compare text values in Power BI

I recently undertook data quality checks in Power BI and evaluated several approaches for comparing text values: Power Query logic, calculated columns, or measures. Each option presented challenges in my specific scenario.

I needed to combine information from multiple tables but avoided joins due to performance concerns. The table’s cardinality made calculated columns unattractive, and DAX measures proved slow when handling 10 million rows of data.

Visual calculations emerged as the solution. Instead of comparing text values with IF ( MIN ( Column1 ) = MIN ( Column2) ) which was very very slow, I implemented a simpler approach within a visual calculation.

The implementation used this expression:

Check = IF( [Street] = [Street1], 0, 1)

This formula returns 1 for mismatched values requiring investigation and 0 for matches. The output displayed these results in a table format.

Table output showing the check column comparing text values

Performance Impact: The visual calculation approach proved significantly faster than previous attempts, making it ideal for large datasets. Visual calculations have really helped me to keep everything easy and performant, and I plan to build additional checks using this method.