DAX | The VALUES function exercise | Allow a user to choose the units when displaying film finances

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.

Software ==> DAX  (28 exercises)
Version ==>
Topic ==> The VALUES function  (4 exercises)
Level ==> Harder than average
Subject ==> Power BI training
Before you can do this exercise, you'll need to download and unzip this file (if you have any problems doing this, click here for help).

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 Power BI file in the above folder - you should see this table:

Film finances

Average box office takings, budget and profit by film certificate.

Use the following menu option to import the Units worksheet from the above folder:

Get data from Excel

Choose to import data from Excel.


Create a slicer allowing you to choose which unit you want to use:

Slicer by unit

A basic slicer - feel free to pimp yours, should you so wish.


Use the HASONEVALUE function (among others!) to create 3 measures showing the average box office takings, budget and profit for the unit chosen:

Currency data

Here we've chosen $m as our unit, so all of the figures are divided by 1000000.  If you don't choose a unit in your slicer your measures should all return blank, since you don't know what divisor to use.

Still got time?  Add a measure called Title (and a card to display it) to show different titles according to whether or not you have chosen a unit:

Unit chosen No unit chosen
Unit chosen No unit chosen

Save this file as Whew, then close it down. 

You can unzip this file to see the answers to this exercise, although please remember this is for your personal use only.
This page has 0 threads Add post