How does the HASONEVALUE function (DAX) work?

Returns TRUE if only one distinct value has been filtered to the context for columnName. Otherwise, it is FALSE.

HASONEVALUE Formula Syntax


How do you use the HASONEVALUE function?

An equivalent expression for HASONEVALUE() is COUNTROWS(VALUES(<columnName>)) = 1.

Related Blog Posts

Related Support Forum Posts

Incorrect column totals in final results
Getting totals correct when using the budget allocation formula
Multiple dynamic filters

Considerations when using the HASONEVALUE function

HASONEVALUE() allows you to identify if your expression is being evaluated in the context of a single value for columnName.

Related Video Tutorials

EDNA TV-Unique subtotal
EDNA TV-Harvesting a slicer selection

Formula examples using the HASONEVALUE function


Related DAX Functions


Related Course Modules



Download our comprehensive DAX Formula Reference Guide as perfect companion as you learn how to use DAX formulas within Power BI.

Download DAX Formulas Reference Guide
Download DAX Formula Reference Guide