Read our blogs, tips and tutorials
Try our exercises or test your skills
Watch our tutorial videos or shorts
Take a self-paced course
Read our recent newsletters
License our courseware
Book expert consultancy
Buy our publications
Get help in using our site
547 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owl trainers only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Search our website
We also send out useful tips in a monthly email newsletter ...
Software ==> | DAX (59 exercises) |
Topic ==> | The CALCULATE function (16 exercises) |
Level ==> | Relatively easy |
Subject ==> | Power BI training |
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.
Open the Tallest Buildings - Calculate Basic Filters.pbix file in the folder shown above. You'll find a matrix displaying a list of countries and a measure which counts the number of buildings.
Add a measure called Count Old Buildings to the Building Measures table. Use the CALCULATE function to count the buildings where the Year Opened field is less than 2000. Here's a reminder of the syntax of the CALCULATE function:
CALCULATE ( Expression, Filter )
Add another measure called % Old Buildings which divides Count Old Buildings by Count Buildings. Add these measures to the matrix visual.
Don't forget to apply appropriate formatting to your measures.
Add a new measure called Count Old Tall Buildings which uses the CALCULATE function to apply the following filters:
Filter | What it should do |
---|---|
Filter 1 | Check the Year Opened field is less than 2000. |
Filter 2 | Check the Height m field is greater than or equal to 400. |
You can add multiple filters in the CALCULATE function by writing them in a comma-separated list.
Display this measure in the matrix.
There aren't many old, tall buildings.
Modify the Count Old Tall Buildings measure so that it applies the following filters:
Filter | What it should do |
---|---|
Filter 1 | Check the Year Opened field is less than 2000. |
Filter 2 | Check the Height m field is greater than or equal to 400 or the Floors above ground field is greater than or equal to 100. |
You can use the || operator to combine filters with an OR.
Check the results of your changes in the matrix.
It's not much of a change for all that effort!
Save and close the file.
You can find other training resources for the subject of this exercise here:
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2024. All Rights Reserved.