Bird
Raised Fist0
Power BIbi_tool~10 mins

Web data import in Power BI - Interactive Code Practice

Choose your learning style10 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to import data from a web URL in Power BI.

Power BI
let
    Source = Web.Contents([1])
in
    Source
Drag options to blanks, or click blank then click option'
A"C:\Users\data.xlsx"
B"https://example.com/data.json"
CExcel.Workbook
DCsv.Document
Attempts:
3 left
💡 Hint
Common Mistakes
Using a local file path instead of a URL.
Forgetting to put the URL in quotes.
Using Excel or CSV functions instead of Web.Contents.
2fill in blank
medium

Complete the code to parse JSON data from a web source in Power BI.

Power BI
let
    Source = Web.Contents("https://api.example.com/data"),
    JsonData = Json.Document([1])
in
    JsonData
Drag options to blanks, or click blank then click option'
ASource
BCsv.Document(Source)
CExcel.Workbook(Source)
DWeb.Contents(Source)
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the URL string directly to Json.Document.
Using CSV or Excel functions on JSON data.
Calling Web.Contents inside Json.Document again.
3fill in blank
hard

Fix the error in the code to correctly import CSV data from a web URL.

Power BI
let
    Source = Web.Contents("https://example.com/data.csv"),
    CsvData = Csv.Document([1], [Delimiter=",", Encoding=1252])
in
    CsvData
Drag options to blanks, or click blank then click option'
A"https://example.com/data.csv"
BWeb.Contents
CCsv.Document
DSource
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the URL string instead of the content variable.
Calling Csv.Document without input.
Using Web.Contents inside Csv.Document.
4fill in blank
hard

Fill both blanks to convert web JSON data to a table and expand the 'items' column.

Power BI
let
    Source = Web.Contents("https://api.example.com/data"),
    JsonData = Json.Document(Source),
    TableData = Table.FromList([1], Splitter.SplitByNothing()),
    Expanded = Table.ExpandRecordColumn(TableData, "Column1", [2])
in
    Expanded
Drag options to blanks, or click blank then click option'
AJsonData[items]
B{"id", "name", "value"}
CJsonData
D["id", "name", "value"]
Attempts:
3 left
💡 Hint
Common Mistakes
Using curly braces instead of square brackets for column names.
Passing the whole JSON instead of the 'items' list.
Not expanding the record column properly.
5fill in blank
hard

Fill all three blanks to import XML data from a web URL and convert it to a table.

Power BI
let
    Source = Web.Contents([1]),
    XmlData = Xml.Tables([2]),
    TableData = XmlData[3]
in
    TableData
Drag options to blanks, or click blank then click option'
A"https://example.com/data.xml"
BSource
C{0}
DXmlData
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the URL string twice.
Using incorrect index to select the table.
Not using quotes around the URL.

Practice

(1/5)
1. What is the main purpose of using Web data import in Power BI?
easy
A. To create visualizations from local Excel files
B. To bring online data into Power BI for analysis
C. To write DAX formulas for calculations
D. To design dashboards without data

Solution

  1. Step 1: Understand the role of Web data import

    Web data import allows Power BI to connect to online sources and bring data into the report.
  2. Step 2: Compare options with this purpose

    Options B, C, and D describe other Power BI features unrelated to web data import.
  3. Final Answer:

    To bring online data into Power BI for analysis -> Option B
  4. Quick Check:

    Web data import = bring online data [OK]
Hint: Web import means getting data from internet sources [OK]
Common Mistakes:
  • Confusing web import with local file import
  • Thinking web import creates visuals directly
  • Mixing web import with DAX formula writing
2. Which of the following is the correct first step to import data from a website in Power BI?
easy
A. Create a new measure in the report view
B. Open Power Query and write a DAX formula
C. Click 'Get Data' then select 'Web' and enter the URL
D. Export data from Power BI to Excel

Solution

  1. Step 1: Identify the import process

    To import web data, you start by clicking 'Get Data' and choosing 'Web' as the source.
  2. Step 2: Check other options

    Options A, B, and D do not describe the correct import steps for web data.
  3. Final Answer:

    Click 'Get Data' then select 'Web' and enter the URL -> Option C
  4. Quick Check:

    First step for web import = Get Data > Web [OK]
Hint: Start with Get Data > Web for web imports [OK]
Common Mistakes:
  • Trying to write DAX before importing data
  • Confusing report view with data import steps
  • Exporting data instead of importing
3. After importing data from a website URL in Power BI, which step is usually needed to prepare the data for reports?
medium
A. Transform and clean the data in Power Query Editor
B. Directly create visuals without any changes
C. Write complex DAX measures before loading data
D. Export the data back to the website

Solution

  1. Step 1: Understand data preparation after import

    Imported web data often needs cleaning and transforming to be useful.
  2. Step 2: Evaluate options

    Transform and clean the data in Power Query Editor correctly states using Power Query Editor to transform data. Options A, C, and D are incorrect or irrelevant.
  3. Final Answer:

    Transform and clean the data in Power Query Editor -> Option A
  4. Quick Check:

    Data prep after import = transform in Power Query [OK]
Hint: Always clean web data in Power Query before reporting [OK]
Common Mistakes:
  • Skipping data cleaning and using raw data
  • Trying to write DAX before loading data
  • Exporting data instead of preparing it
4. You tried to import data from a website but got an error saying the URL is invalid. What is the most likely cause?
medium
A. The URL is missing the 'http://' or 'https://' prefix
B. Power BI does not support web data import
C. You forgot to write a DAX formula first
D. The data is already loaded in Power BI

Solution

  1. Step 1: Identify common URL errors

    Web URLs must include 'http://' or 'https://' to be valid for import.
  2. Step 2: Check other options

    Power BI supports web import (B wrong), DAX is unrelated (C wrong), and data loaded already doesn't cause URL errors (D wrong).
  3. Final Answer:

    The URL is missing the 'http://' or 'https://' prefix -> Option A
  4. Quick Check:

    URL must start with http:// or https:// [OK]
Hint: Check URL starts with http:// or https:// [OK]
Common Mistakes:
  • Ignoring URL format requirements
  • Thinking DAX is needed before import
  • Assuming Power BI can't import web data
5. You want to create a Power BI report that updates daily with sales data from a web API. Which approach is best to ensure fresh data?
hard
A. Export Power BI data to the web API
B. Manually copy and paste data from the website daily
C. Write DAX measures to fetch data from the web
D. Use Web data import with scheduled refresh enabled

Solution

  1. Step 1: Understand data refresh options

    Using Web data import with scheduled refresh allows automatic daily updates from the web API.
  2. Step 2: Evaluate other options

    Manual copy-paste (B) is inefficient, DAX cannot fetch web data (C), and exporting data (A) is opposite of importing.
  3. Final Answer:

    Use Web data import with scheduled refresh enabled -> Option D
  4. Quick Check:

    Scheduled refresh + web import = fresh daily data [OK]
Hint: Enable scheduled refresh for automatic web data updates [OK]
Common Mistakes:
  • Relying on manual data updates
  • Trying to fetch web data with DAX
  • Confusing export with import
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard