Bird
0
0

You run this M code:

medium📝 Formula Fix Q7 of 15
Power BI - Data Cleaning with Power Query
You run this M code:
let
  Source = Table.FromRows({{"ID", "Value"}, {null, 100}}),
  Promoted = Table.PromoteHeaders(Source, [PromoteAllScalars=false])
in
  Promoted

and get an error. What is the most probable reason?
AThe table has duplicate column names in the first row.
BThe first row contains null values which cannot be promoted as headers.
CThe PromoteAllScalars option is set to true, causing conflicts.
DThe table has more than two columns.
Step-by-Step Solution
Solution:
  1. Step 1: Analyze first row

    The first row is {"ID", "Value"}, but the second row has a null in the first column.
  2. Step 2: Understand PromoteAllScalars=false

    This setting disallows promoting null or scalar values as headers.
  3. Step 3: Cause of error

    Null in data rows can cause header promotion to fail if PromoteAllScalars is false.
  4. Final Answer:

    The first row contains null values which cannot be promoted as headers. -> Option B
  5. Quick Check:

    Check for nulls in header row [OK]
Quick Trick: Nulls in header row cause promotion errors [OK]
Common Mistakes:
  • Assuming duplicates cause this error
  • Confusing PromoteAllScalars setting
  • Ignoring null values in headers

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Power BI Quizzes