Returns TRUE when the context for columnName has been filtered down to one distinct value only. Otherwise is FALSE.
|columnName||The name of an existing column, using standard DAX syntax. It cannot be an expression.|
TRUE when the context for columnName has been filtered down to one distinct value only. Otherwise is FALSE.
An equivalent expression for HASONEVALUE() is
COUNTROWS(VALUES(<columnName>)) = 1.
This function is not supported for use in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.
The following measure formula verifies if the context is being sliced by one value in order to estimate a percentage against a predefined scenario; in this case you want to compare Reseller Sales against sales in 2007, then you need to know if the context is filtered by single years. Also, if the comparison is meaningless you want to return BLANK.