Tutorial with example
Have you ever got this error message?: A table of multiple values was supplied where a single value was expected ?
If you have, make sure to check out this video to understand how to solve it.
HASONEVALUE is a DAX function that will check if the table returned has one value or not. If it has, it will return TRUE() otherwise it will return false.
HASONEVALUE is syntax sugar or equivalent of COUNTROWS(VALUES(ColumnName))=1
Download example file:
To get the files:
1. Go to Curbal Download Center > Dax Fridays
2. Get File #29
- An equivalent expression for HASONEVALUE() is
COUNTROWS(VALUES(<columnName>)) = 1.