HASONEFILTER Function (DAX)
How does the HASONEFILTER function (DAX) work?
HASONEFILTER function (DAX) returns TRUE when the number of directly filtered values on columnName is one; otherwise returns FALSE.
HASONEFILTER Formula Syntax
HASONEFILTER(<columnName>)
How do you use the HASONEFILTER function?
It returns TRUE when the number of directly filtered values on columnName is one and only one. Otherwise, returns FALSE.
Related Blog Posts
Considerations when using the HASONEFILTER function
This function is similar to HASONEVALUE() with the difference that HASONEVALUE() works based on cross-filters while HASONEFILTER() works by a direct filter.
Related Video Tutorials
Formula examples using the HASONEFILTER function
=IF(HASONEFILTER(ResellerSales_USD[ProductKey]),FILTERS(ResellerSales_USD[ProductKey]),BLANK())