Power BI Exercises

A title that follows the slicer

Advanced DAX · Advanced · Chapter 9 of 10. Variables, ranking, iterators and dynamic labels.

The request, from Owen Price, Founder, Copperbean Coffee: "The chart title should say which category is selected, or "all drinks" when nothing is." A measure named Revenue Title.

Measures can return text. SELECTEDVALUE(column, "alternate") returns the one selected value, or the alternate when there is none or several. Join text with & to build a dynamic title for a card or chart.

Task: Create Revenue Title = "Revenue for " & SELECTEDVALUE(Drink[Category], "all drinks").

Practice data: Copperbean Coffee, a fictional chain of coffee shops. The model has the Orders, Drink and Store tables.

DAX functions used: SELECTEDVALUE.

How it works: the exercise opens a practice copy of the Power BI report editor in your browser. Do the task, press Check, and your result is compared with the expected answer in seconds. Hints are there if you get stuck.

Keep practicing