Returns the value when there’s only one value in the specified column, otherwise returns the alternate result.
The column from which a single value is to be returned.
The value that is returned when there is no value or more than one value in the specified column; if omitted, BLANK is returned.
The value when the context for ColumnName has been filtered down to one distinct value only. Else, AlternateResult.
A similar expression for
SELECTEDVALUE( <columnName>, <alternateResult>)
IF(HASONEVALUE(<columnName>), VALUES(<columnName>), <alternateResult>)
Learn more about SELECTEDVALUE in the following articles:
Using the SELECTEDVALUE function in DAX
This article describes how the SELECTEDVALUE DAX function simplifies the syntax required in many scenarios where you need to read a single value selected in the filter context. » Read more
Showing the top 5 products and Other row
This article shows how to add an additional “other” row to the selection obtained using the Top N filter in a Power BI report. » Read more
Comparing with previous selected time period in DAX
This article describes how you can create a comparison with the previous time period in a visualization, regardless of whether the time periods are consecutive or not. » Read more
Other related functions are:
Contributors: Alberto Ferrari, Marco Russo
MSDN documentation: https://docs.microsoft.com/en-us/dax/selectedvalue-function