All checks
DAXPerformanceLow

COUNTROWS(DISTINCT(…)) instead of DISTINCTCOUNT

"COUNTROWS(DISTINCT(…)) instead of DISTINCTCOUNT" is one of the performance checks Auditabi runs on a Power BI semantic model. n expression(s) wrap DISTINCT or VALUES in COUNTROWS. It is a low-severity finding: hygiene and maintainability, worth fixing when you next touch the object. Replace COUNTROWS(DISTINCT(column)) with DISTINCTCOUNT(column).

What is detected

n expression(s) wrap DISTINCT or VALUES in COUNTROWS. DISTINCTCOUNT expresses the same intent in one operation the engine optimises directly.

Why it matters

Hygiene and maintainability. Fix when touching the object.

How to fix it

Replace COUNTROWS(DISTINCT(column)) with DISTINCTCOUNT(column).

Does your model fail this check?

Free static audit with the exact objects, no account, nothing stored.

Audit a model

More DAX checks