WISE OWL EXERCISES
POWER BI EXERCISES
DAX | Basic measures exercise | Create some measures to show aggregated film sales data
This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.
You can learn how to do this exercise if you attend the course listed below!
You need a minimum screen resolution of about 700 pixels width to see our exercises. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.
Open the file in the above folder in Power BI Desktop. It's missing a certain je ne sais quoi:
Create a table called Film measures to hold your measures:
As a reminder, in Power BI you can click on this tool to start creating a new table.
Create a measure called Average Box Office to show the average box office takings for each film (dividing by 1,000,000 to make the figures more readable):
You can right-click on the measure in the field well to apply conditional formatting by this measure (in this case to show that 12A Fantasy films have the highest average box office takings - although if you scroll down you'll find 12 certificate Romance films do even better).
Create another measure called Average Profit, to show the average difference between the box office takings and budget for each film:
Once more, 12A Fantasy films rule (although again, scrolling will reveal that 12 certificate Romance films do even better).
Because you're averaging an expression, you won't be able to use the standard AVERAGE function.
Create one more measure called Number of films to count the number of films for the filter context (use COUNTROWS). Create a table on a separate page to show your measures:
Inside information: depressingly, the two films which propel 12 certificate romantic films to the top of the list are Ghost and Titanic.
You can click on the Average profit column heading to sort the genres in descending average profit order (although you probably knew that already ...).
Save this as Just let go, then close it down.