OData is a web protocol that allows Power BI to connect and fetch data from online sources using a standard URL format. It makes data access easy and consistent.
Click to reveal answer
beginner
What does REST API stand for and how is it used in Power BI?
REST API stands for Representational State Transfer Application Programming Interface. Power BI uses it to get data from web services by sending requests and receiving data in formats like JSON.
Click to reveal answer
beginner
How do you connect to an OData feed in Power BI?
In Power BI Desktop, go to 'Get Data', choose 'OData Feed', then enter the OData URL. Power BI will connect and show available tables to load.
Click to reveal answer
beginner
What is a common data format returned by REST APIs for Power BI?
JSON (JavaScript Object Notation) is the most common data format returned by REST APIs, which Power BI can parse and convert into tables.
Click to reveal answer
intermediate
Why is authentication important when connecting to REST APIs in Power BI?
Authentication ensures only authorized users can access the data. Power BI supports methods like API keys or OAuth to securely connect to REST APIs.
Click to reveal answer
Which protocol does Power BI use to connect to an OData feed?
AHTTP/HTTPS
BFTP
CSMTP
DSSH
✗ Incorrect
OData feeds use HTTP or HTTPS protocols to transfer data over the web.
What data format does a REST API commonly return for Power BI to consume?
AXML
BCSV
CJSON
DTXT
✗ Incorrect
REST APIs commonly return data in JSON format, which Power BI can easily parse.
Which Power BI feature allows you to connect directly to a REST API?
AGet Data > Excel
BGet Data > Web
CGet Data > Folder
DGet Data > SQL Server
✗ Incorrect
The 'Web' connector in Power BI lets you connect to REST APIs by entering the API URL.
What is the main purpose of authentication when connecting to REST APIs?
ATo secure data access
BTo speed up data transfer
CTo format data
DTo compress data
✗ Incorrect
Authentication ensures that only authorized users can access the API data.
Which of these is NOT a typical step when connecting to an OData feed in Power BI?
AEntering the OData URL
BAuthenticating if required
CSelecting tables to load
DWriting SQL queries
✗ Incorrect
You do not write SQL queries when connecting to OData feeds; you select tables from the feed.
Explain how Power BI connects to data using OData feeds and what makes OData useful.
Think about how you open a website and see data organized in tables.
You got /4 concepts.
Describe the process and key considerations when connecting Power BI to a REST API.
Imagine ordering data from a web service and needing permission to get it.
You got /4 concepts.
Practice
(1/5)
1. What is the main advantage of using an OData connection in Power BI compared to a generic REST API?
easy
A. It cannot refresh data automatically.
B. It requires manual coding for every data request.
C. It only works with Excel files.
D. It provides a standardized query language and easier data filtering.
Solution
Step 1: Understand OData protocol features
OData supports standardized query options like filtering, sorting, and paging directly in the URL.
Step 2: Compare with REST API flexibility
REST APIs are flexible but often require custom query parameters and manual handling of data requests.
Final Answer:
It provides a standardized query language and easier data filtering. -> Option D
Quick Check:
OData = Standardized queries [OK]
Hint: OData uses standard queries; REST APIs need custom calls [OK]
Common Mistakes:
Thinking OData only works with Excel
Assuming REST APIs auto-refresh data
Believing OData requires manual coding
2. Which Power Query M function is used to connect to a REST API endpoint in Power BI?
easy
A. OData.Feed()
B. Web.Contents()
C. Csv.Document()
D. Excel.Workbook()
Solution
Step 1: Identify function for REST API calls
The Web.Contents() function fetches data from any web URL, including REST APIs.
Step 2: Differentiate from OData function
OData.Feed() is specific for OData sources, not generic REST APIs.
Final Answer:
Web.Contents() -> Option B
Quick Check:
REST API = Web.Contents() [OK]
Hint: Use Web.Contents() for REST API URLs [OK]
Common Mistakes:
Using OData.Feed() for REST APIs
Confusing CSV import with API calls
Trying Excel.Workbook() for web data
3. Given this Power Query M code snippet connecting to an OData feed:
let
Source = OData.Feed("https://services.odata.org/V4/Northwind/Northwind.svc/Products"),
Filtered = Table.SelectRows(Source, each [CategoryID] = 1)
in
Filtered
What will be the result?
medium
A. An empty table because CategoryID is not a valid column.
B. An error because OData.Feed cannot filter data.
C. A table of products where CategoryID equals 1.
D. A list of all categories instead of products.
Solution
Step 1: Understand OData.Feed output
The OData.Feed() function returns a table of products from the OData service.
Step 2: Analyze filtering step
Table.SelectRows() filters rows where CategoryID equals 1, which is valid for this dataset.
Final Answer:
A table of products where CategoryID equals 1. -> Option C
Quick Check:
Filter by CategoryID=1 = filtered product table [OK]
Hint: OData.Feed returns tables; filter with Table.SelectRows() [OK]
Common Mistakes:
Assuming OData.Feed cannot filter
Confusing products with categories
Thinking CategoryID column is missing
4. You wrote this Power Query M code to get data from a REST API:
let
Source = Web.Contents("https://api.example.com/data"),
Json = Json.Document(Source),
Table = Table.FromList(Json, Splitter.SplitByNothing())
in
Table
But you get an error saying "Expression.Error: We cannot convert the value to a table." What is the likely cause?
medium
A. The JSON returned is an object, not a list, so Table.FromList fails.
B. Web.Contents() cannot fetch JSON data.
C. Json.Document() only works with XML data.
D. Splitter.SplitByNothing() is not a valid function.
Solution
Step 1: Check JSON structure expected
Table.FromList() expects a list, but if JSON is an object (record), it cannot convert directly.
Step 2: Understand error cause
The error means the JSON is not a list but an object, so conversion fails.
Final Answer:
The JSON returned is an object, not a list, so Table.FromList fails. -> Option A
Quick Check:
JSON object ≠ list causes conversion error [OK]
Hint: Check if JSON is list or object before Table.FromList() [OK]
Common Mistakes:
Thinking Web.Contents() can't get JSON
Assuming Json.Document() only parses XML
Believing Splitter.SplitByNothing() is invalid
5. You want to combine data from an OData feed and a REST API in Power BI. The OData feed provides product details, and the REST API returns live stock levels as JSON. Which approach is best to create a unified table for reporting?
hard
A. Use OData.Feed() to get products, Web.Contents() + Json.Document() for stock, then merge tables in Power Query.
B. Use only OData.Feed() for both sources since it supports all APIs.
C. Import REST API JSON as CSV and append to OData feed table directly.
D. Load both sources separately and create relationships in the data model without merging.
Solution
Step 1: Connect to each data source appropriately
Use OData.Feed() for the OData product details and Web.Contents() with Json.Document() to parse REST API stock JSON.
Step 2: Combine data in Power Query
Merge the two tables on product ID to create a unified table before loading into the report.
Final Answer:
Use OData.Feed() to get products, Web.Contents() + Json.Document() for stock, then merge tables in Power Query. -> Option A
Quick Check:
Combine sources with correct connectors and merge [OK]
Hint: Use correct connectors per source, then merge in Power Query [OK]
Common Mistakes:
Trying to use OData.Feed() for REST API JSON
Appending JSON as CSV without parsing
Not merging data, just relating tables
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.