Ravindra BagaleCourses & study guides

20. Dynamic Text and Dynamic Colour (Conditional Formatting)

20.2 Dynamic Titles with Measures

Steps in Power BI

  1. Create the measure (below) with Home › New measure. It must return text.
  2. Select the chart › Format visual › General › Title › Text › click fx.
  3. Format style: Field value; What field should we base this on?: [Title Orders by City] › OK.
  4. Change the Platform and Month slicers. The title changes, e.g. "Blinkit orders by city – Oct 2025".
Selected Platform = SELECTEDVALUE(Orders[Platform], "All platforms")

Title Orders by City =
VAR p = SELECTEDVALUE(Orders[Platform], "Blinkit + Amazon Now")
VAR m = IF(HASONEVALUE('Date'[Year Month]), FORMAT(MAX('Date'[Date]), "mmm yyyy"), "selected period")
RETURN p & " orders by city – " & m

SELECTEDVALUE(column, alternate) returns the value when exactly one is selected, otherwise the alternate text.

Samjla ka? Selection nasel, ek asel, anek astil – tinhi case test kara.

Ravindra Bagale's Tip

Friends, pay attention: a dynamic title that shows "Sales for Pune" when nothing is selected is misleading. Handle the "no selection" and "multiple selection" cases in the measure, for example with SELECTEDVALUE(DarkStore[City], "All cities"). Test the title with zero, one and several cities selected. Don't make this mistake!