EXERCISE TOPIC▼
- Access exercises (91)
- C# exercises (79)
- Excel exercises (278)
- Power Apps exercises (13)
- Power Automate exercises (18)
- Power BI exercises (139)
- Power Platform exercises (157)
- Python exercises (28)
- Report Builder exercises (141)
- SQL exercises (198)
- SSAS exercises (51)
- SSIS exercises (46)
- SSRS exercises (99)
- VBA exercises (85)
- Visual Basic exercises (46)
POWER BI EXERCISES▼
POWER BI EXERCISES▼
- Basic reports (10)
- Data sources (2)
- Query editor (8)
- Filtering data (9)
- Drill-through (1)
- Charts (10)
- Matrices (1)
- Basic maps (6)
- Calculated columns (8)
- Roles and security (1)
- Drill-through and bookmarks (3)
- Report themes (2)
- Power BI mobile (1)
- Advanced tables (3)
- Conditional formatting (5)
- Analytics (2)
- Decomposition tree (1)
- Other visuals (1)
- Tooltips (2)
- Bookmarks (4)
- Quick measures (3)
- Dynamic display (1)
- Custom visuals (3)
- Advanced data sources (4)
- Basic parameters (1)
- Column transforms (2)
- Combining queries (2)
- Manipulation transforms (1)
- Normalising tables (2)
- Simple parameters (1)
- Dropdown parameters (1)
- Stored procedures (1)
- Dynamic connections (2)
- Custom functions (3)
- APIs (3)
- Power BI Templates (1)
Power BI | Calculated columns 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.
Software ==> | Power BI (111 exercises) |
Version ==> | Latest update |
Topic ==> | Calculated columns (8 exercises) |
Level ==> | Average difficulty |
Subject ==> | Power BI training |
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 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:

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:

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:

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.