The busiest hour
Advanced DAX · Advanced · Chapter 9 of 10. Variables, ranking, iterators and dynamic labels.
The request, from Owen Price, Founder, Copperbean Coffee: "How many cups do we pour in each shop's busiest hour? That's what the rota has to cover." A measure named Peak Hour Cups.
MAXX(VALUES(Orders[Hour]), [Total Cups]) goes through each hour, computes its cups, and keeps the largest: the cups served in the busiest hour, per shop.
Task: Create Peak Hour Cups = MAXX(VALUES(Orders[Hour]), [Total Cups]).
Practice data: Copperbean Coffee, a fictional chain of coffee shops. The model has the Orders, Drink and Store tables.
DAX functions used: MAXX, VALUES.
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.