ALL SOFTWARE EXERCISES
- EXERCISES HOME PAGE (813)
- Access 2010 (66)
- Access VBA Macros (17)
- Advanced VBA (29)
- Excel 2010 (83)
- Excel 2013 (10)
- Excel 2016 (0)
- Excel VBA Macros (37)
- Power BI - Excel 2013 (25)
- Power BI - Excel 2016 (23)
- Power BI Desktop (26)
- PowerPivot 2010 (26)
- Report Builder 3.0 (42)
- SQL (156)
- SSAS - multidimensional (21)
- SSAS - tabular (29)
- SSIS Integration Services (40)
- SSRS Reporting Services (53)
- Visual Basic (45)
- Visual C Sharp (65)
- WPF - Visual C# (20)
POWER BI - EXCEL 2013 EXERCISES
- PowerPivot data models (1)
- Pivot tables using PowerPivot (2)
- Using Excel tables (1)
- Transforming data in Power Query (3)
- Calculated columns (2)
- The CALCULATE function (4)
- More advanced DAX functions (3)
- Date functions (3)
- KPIs (2)
- Power View basics (1)
- Power View Filters (1)
- Power View maps (1)
- Power Map (GeoFlow) (1)
Exercise: Change data types of columns in world population table
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 course listed below!
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 up the workbook called Tables in the above folder, and have a look at the Populations worksheet:
We'll import this data into an Excel worksheet, tweaking it along the way.
Now close this workbook down, and create a new workbook.
You could use try loading the source data from the original Wikipedia page at http://bit.ly/14wM1IU if you have an Internet connection, although this may not be in the same format by the time you do the exercise.
In Power Query, choose to create a query based on this workbook:
The option you'll need to choose. Make sure you choose the table called Populations, not the one with the much longer name.
Do the following things to make this table easier to read:
- Tell Power Query to use the first row as column headings.
- Delete the Source column (we don't need it).
- Change the data type of the Date column to Date.
- Change the data type of the Population column to Whole Number.
- Shorten the name of the Country column.
You should now have something like this:
It's looking a bit more manageable!
To use this data in Excel, you'll have to turn the percentage columns into numbers. Try doing this, and you'll see this doesn't work:
The % sign is messing things up!
Undo this (except it's not undoing, it's deleting the last step of the query), and replace values in the % of world population column to replace all % symbols with spaces. You should now be able to change the data type to Decimal Number.
Load this data into your (presumably empty) PowerPivot data model:
We've changed the format of the date to make it look tidier. It's a shame we didn't make the Rank column a number too!
Change the data type of the Rank column in PowerPivot, then save your workbook as Populations and close it down.