Syntax
HASONEVALUE(<columnName>)
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
Remarks
- An equivalent expression for HASONEVALUE() is
COUNTROWS(VALUES(<columnName>)) = 1
.
Was this helpful?
Thanks from Brazil Ruth !
Thanks!
/Ruth
Hola Ruth.
Recibe una felicitacion por tu MVP…
Apenas ayer vi uno de tus videos ¿Dax /BI?, estas aplicaciones son nuevas, no sabia de su existencia¿es acaso un super excel?
Muy interesante sinembargo necesito el ABC (alfa) para empezar con mis pininos en estas aplicaciones ¿que videos tuyos me recomiendas?
Saludos desde Monterrey N.L., Mexico
Hola Jose,
Empieza aqui, es totalmemte gratis:
https://curbal.com/blog/course/high-level-introduction-to-power-bi
/Ruth