Exercise: Use new columns to show average floor areas / building types

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.

The answer to the exercise will be included and explained if you attend the Wise Owl course listed below!

Category ==> Power BI Desktop  (26 exercises)
Topic ==> Calculated columns  (2 exercises)
Level ==> Average difficulty
Course ==> Power BI Desktop
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.

Create a new Power BI Desktop file, and load the Buildings worksheet from the Excel workbook in the above folder (you can view the original Skyscraper Center data via a link here). 

There are 3 columns giving the uses to which each building is put:

The 3 uses

The last 3 columns tell you how each building is used.

Use the IF function to create a new column to show for each office its use type, following these rules:

Rule Use type
If any of the 3 Use columns is office Office, etc
Otherwise Other

Show the number of buildings per use type and country code in a matrix - you should get these results:

Use of buildings

AE - the United Arab Emirates - seems to be the place to go if you want to see skyscrapers without offices in them.

 

Create a column giving the floor height per building (the height in metres divided by the number of floors), and use this to show the average floor height per country:

Floor height by country

It seems hard to believe British buildings are infinitely high; easier to believe that Wise Owl have added a rogue office to the list with nothing filled in for the number of floors, and this is giving a divide by zero error.

 

Amend your floor height formula so that it gives a blank if there is no value in the Floors column.

To do this you can either use the DIVIDE function, or use the IFERROR function to test for an error.

After correcting your formula, your table should now look like this:

Corrected floor heights

For Britain there are two buildings, but in calculating the average the one which returns a blank floor height is (correctly) ignored.

Save this file as Kingsmoor, and close down the Power BI instance you're using. 

This page has 0 threads Add post