Introduction
As we know, Power BI supports many sources of data. We have more than 100 sources of data into Power BI from where we can get data. ‘Web’ source is one of them. In a previous article you have learned how to import data from Excel, CSV, and SQL Server. Today in this article you will learn how to import a data from the web. For this you can choose any weblink from where you need data. In this article I will get the data from a website of ‘Tennis Warehouse’. Below is the link of the web page.
https://www.tennis-warehouse.com/Nike_Tennis_Shoes/catpage-MSNIKE.html
This is a shopping website and the web page will be shown like the below image.
For practice you can use this link and follow the below steps to fetch data from the web.
Step 1
First you need to check the ‘Options and Settings’ of Power BI Desktop. For this, go to ‘File’ and click on ‘Options and Settings’ and go to ‘Options’
Now click on ‘Preview features’ and check whether the ‘New web table inference’ is selected or not. If not, then it must be selected and click on ‘OK’.
Step 2
To import data, go to ‘Get data’ option on the home page and click on ’Web’.
A window will open. Paste the above URL or here in this box and click ‘Ok’.
Once you click on ‘Ok’ a new window will open and click on ‘connect’. Your data is now connected. Select ‘Nike Tennis Shoes’ table and you can see the 3 columns. You can load this table easily by clicking on ‘Load’, but I am using the other way; i.e., by by adding new table and clicking on ‘Add Table Using Example’ on the left side of the tool.
Step 3
After clicking on ‘Add Table Using Example’, a new window will open as in the below image. Here you can see the web page by scrolling down the upper window.
You can confirm that you imported the web page correctly.
In the below window you can see the blank column, ‘Column 1’. I am going to rename this column by double clicking on it as ‘Shoes’. Also I will insert the value in this column. To insert the values into the column, double click on the first row and type the item names that are shown in the first row. See the below image:
While you start typing the first value you will find many options.
Similarly you can insert many records in this column.
Step 4
Now I will insert two more columns, ‘Price’, and ‘Tag’ in this table by clicking on start button.
Insert the value of Price of shoe and ‘New’ in the Tag column; you can see the ‘New’ at right side of the column in green.
After inserting the data int the table click on ‘Ok’. Your table has been created and is ready to load.
Summary
I hope you enjoy this article. In the next article we will see how to use that table and how to create a report from it. Thanks for reading.