0
0
Power BIbi_tool~10 mins

Web data import in Power BI - Cell-by-Cell Formula Trace

Choose your learning style9 modes available
Sample Data

Sample data imported from a web source showing countries and their populations.

CellValue
A1Country
B1Population
A2USA
B2331000000
A3India
B31380000000
A4Brazil
B4213000000
Formula Trace
Web.Contents("https://example.com/api/population")
Step 1: Web.Contents("https://example.com/api/population")
Step 2: Json.Document(Web.Contents("https://example.com/api/population"))
Step 3: Table.FromList(Json.Document(Web.Contents("https://example.com/api/population")), Splitter.SplitByNothing(), null, null, ExtraValues.Error)
Step 4: Table.ExpandRecordColumn(previous_step, "Column1", {"Country", "Population"})
Cell Reference Map
    A           B
1 | Country   | Population
2 | USA       | 331000000
3 | India     | 1380000000
4 | Brazil    | 213000000
The imported table has two columns: Country and Population, with data from the web API.
Result
    A           B
1 | Country   | Population
2 | USA       | 331000000
3 | India     | 1380000000
4 | Brazil    | 213000000
The final table shows countries and their populations imported from the web source.
Sheet Trace Quiz - 3 Questions
Test your understanding
What does the function Web.Contents("https://example.com/api/population") do?
AIt expands records into columns.
BIt fetches raw data from the web URL.
CIt parses JSON data into a table.
DIt filters the data by country.
Key Result
Web.Contents fetches data from a URL; Json.Document parses JSON; Table.FromList converts list to table; Table.ExpandRecordColumn expands records into columns.