Complete the code to connect Power BI to an OData feed URL.
let
Source = OData.Feed("[1]")
in
SourceThe OData.Feed function requires a valid OData service URL to connect and retrieve data.
Complete the code to add HTTP headers when connecting to a REST API in Power BI.
let
Source = Json.Document(Web.Contents("https://api.example.com/data", [Headers=[[1]]]))
in
SourceHeaders in Web.Contents must be passed as a record inside a record, using square brackets and equals signs.
Fix the error in the Power Query code to correctly parse JSON from a REST API.
let
Source = Web.Contents("https://api.example.com/data"),
JsonData = Json.Document([1])
in
JsonDataWeb.Contents instead of its result.Source as a function with parentheses.Json.Document inside itself.The Json.Document function needs the binary content from Web.Contents, which is stored in the variable Source.
Fill both blanks to filter OData feed data for products with Price greater than 100.
let
Source = OData.Feed("https://services.odata.org/V4/OData/OData.svc/"),
Filtered = Table.SelectRows(Source, each [1] > [2])
in
FilteredTo filter rows where the Price column is greater than 100, use [Price] and the number 100.
Fill all three blanks to create a custom header and query parameter for a REST API call in Power BI.
let
Source = Web.Contents(
"https://api.example.com/data",
[
Headers = [[1]],
Query = [[2] = [3]]
]
)
in
SourceThe Headers record must include the Authorization token. The Query record uses the key "filter" and the value "status eq 'active'" to filter data.