Events
Sep 15, 6 AM - Sep 17, 3 PM
The best Power BI community-led event. Sept 2025. Use code FABLEARN to save €200.
Get registeredThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to:
Calculated column
Calculated table
Measure
Visual calculation
Returns TRUE
when the number of directly filtered values on columnName
is one; otherwise returns FALSE
.
HASONEFILTER(<columnName>)
Term | Definition |
---|---|
columnName |
The name of an existing column, using standard DAX syntax. It cannot be an expression. |
TRUE
when the number of directly filtered values on columnName
is one; otherwise returns FALSE
.
This function is similar to HASONEVALUE() with the difference that HASONEVALUE() works based on cross-filters while HASONEFILTER() works by a direct filter.
This function is not supported for use in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.
The following example shows how to use HASONEFILTER() to return the filter for ResellerSales_USD[ProductKey]) if there is one filter, or to return BLANK if there are no filters or more than one filter on ResellerSales_USD[ProductKey]).
= IF(HASONEFILTER(ResellerSales_USD[ProductKey]),FILTERS(ResellerSales_USD[ProductKey]),BLANK())
Events
Sep 15, 6 AM - Sep 17, 3 PM
The best Power BI community-led event. Sept 2025. Use code FABLEARN to save €200.
Get registeredAsk Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in