Back to All DAX Concepts
Context & Filtering

DAX SELECTEDVALUE Function

Dynamically read single slicer selections in formulas and titles.

Syntax Definition:
SELECTEDVALUE( Column, [AlternateResult] )

Overview

SELECTEDVALUE returns the value of a column when there is only one distinct value in the current filter context; otherwise returns an alternate result.

Architectural Deep Dive

SELECTEDVALUE is syntactic sugar for IF(HASONEVALUE(Column), VALUES(Column), AlternateResult). It is widely used in Power BI to create dynamic chart titles, subtitle KPIs, and drive disconnected parameter tables.

Canonical Pattern Example:

Selected Country Title = 
"Performance in " & SELECTEDVALUE(Customers[Country], "All Countries")

Common Anti-Patterns & Mistakes to Avoid

  • Expecting a value when multiple items are selected in a multi-select slicer (it will return the alternate result).
  • Using SELECTEDVALUE on numeric measures rather than dimensional columns.
Interactive Challenge

Put DAX SELECTEDVALUE Function into practice

Solve "Customer Segment Title with SELECTEDVALUE" in our interactive Monaco editor with live dataset verification.