Power BI | Query editor exercise | Import the latest FTSE stock market prices using Query Editor

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 one of more of the courses listed below!

Software ==> Power BI  (88 exercises)
Version ==> Latest update
Topic ==> Query editor  (8 exercises)
Level ==> Relatively easy
Courses ==> Introduction to Power BI  /  Fast track Power BI/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.

Create a new Power BI report.

Note that if you want to make this exercise more exciting, you could get the data directly from the source - in this case https://tinyurl.com/y28ohs7r.

Load the data from the workbook in the above folder - you should see something like this:

Initlai FTSE list

The initial list of shares, which is begging to be tidied up!

In Query Editor, carry out the following transforms:

  1. Choose to Use First Row as Headers (this may not always be necessary).
  2. Remove all but the first, second and fifth columns.
  3. Rename the remaining columns as shown below.

You should now be looking at something like this:

The revised list

The remaining table of data.

Your prices are left-aligned, which suggests that Power BI is treating them as text.  Change the data types of the last two columns so that they are (decimal) numbers:

Text as numbers

Better - now we can do arithmetic on these columns ...

Choose to add a new column:

Adding a column

Choose to add a column using this icon.

 

Create a column which subtracts the last closing price from the current one, rename it and sort by it to get:

Sorting by change of price

It's been a good day today for holders of shares in NMC Health PLC.

Save this data back into Power BI proper, and use it to create a simple table:

Table of shares

Totals would be meaningless in this context, so you should choose not to display them.

 

Save this report as Equity, then close it down.

This page has 0 threads Add post