Bird
0
0

What is the expected output of this Power Query M code?

medium📝 Formula Result Q5 of 15
Power BI - Getting Data
What is the expected output of this Power Query M code?
let
  Raw = Web.Contents("https://api.example.com/users"),
  Json = Json.Document(Raw),
  Users = Json["users"],
  Table = Table.FromList(Users, Splitter.SplitByNothing())
in
  Table
AAn error due to incorrect JSON parsing
BA single record containing all users concatenated
CA table listing each user as a single row
DA table with columns for user details automatically expanded
Step-by-Step Solution
Solution:
  1. Step 1: Retrieve JSON data

    Web.Contents fetches raw data, Json.Document parses it.
  2. Step 2: Extract 'users' array

    Json["users"] accesses the list of users.
  3. Step 3: Convert list to table

    Table.FromList creates a table with each user as a row.
  4. Final Answer:

    A table listing each user as a single row -> Option C
  5. Quick Check:

    List to table conversion creates rows [OK]
Quick Trick: Json.Document + Table.FromList creates row per list item [OK]
Common Mistakes:
  • Expecting automatic column expansion
  • Assuming concatenated string output
  • Misunderstanding JSON parsing steps

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Power BI Quizzes