DAX code
Selected Date Range Text =
VAR StartDate = MIN('Date'[Date])
VAR EndDate = MAX('Date'[Date])
RETURN
FORMAT(StartDate, "MMM d, yyyy") & " – " & FORMAT(EndDate, "MMM d, yyyy")
Builds a text label showing the first and last date currently selected, for display in a report title or subtitle.
Type your table and column names once. Every measure below updates.
Selected Date Range Text =
VAR StartDate = MIN('Date'[Date])
VAR EndDate = MAX('Date'[Date])
RETURN
FORMAT(StartDate, "MMM d, yyyy") & " – " & FORMAT(EndDate, "MMM d, yyyy")
Requires at least one date to be in context (from a slicer or visual filter) for MIN/MAX to return meaningful values.
Browse all 175 measures in the Power BI DAX Measures Library, or search the library for something similar to Selected Date Range Text.