DAX | Calculated columns exercise | Create a calculated column using the DIVIDE function

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!

Software ==> DAX  (21 exercises)
Version ==>
Topic ==> Calculated columns  (5 exercises)
Level ==> Relatively easy
Course ==> DAX
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 that it contains a list of the 61 tallest buildings in the world at the time of writing:

Tall buildings

Well, the 60 tallest buildings and one ringer at the bottom ...

Create a calculated column in the Buildings table to show the average height of each floor for each building (divide the Metres column by the Floors column):

Average floor height

If you add this column to your table and sort by it, you'll see Giant Owl Towers appears at the top.

The problem is that this building has zero floors (this looks like a sloppy data input error on the part of the Wise Owl exercises team).  Amend your formula so that it shows a blank for the average floor height for buildings with no floors:

Buildings in height order

Much better - if you sort the buildings in ascending order by average floor height, Giant Owl Towers appears at the top of the list.

There are at least 3 ways to do this, using either DIVIDE, ISERROR or IF.  Which do you think is the best solution?

Save your Power BI file as GOT a problem, 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