Bird
0
0

You used this M code to pivot a column:

medium📝 Formula Fix Q6 of 15
Power BI - Data Cleaning with Power Query
You used this M code to pivot a column:
Table.Pivot(Source, List.Distinct(Source[Type]), "Type", "Value")

but it returns an error. What is the most probable reason?
AThere are duplicate values in the pivot column without specifying an aggregation function
BThe source table is empty
CThe column names are case-sensitive and mismatched
DList.Distinct is not a valid function in Power Query
Step-by-Step Solution
Solution:
  1. Step 1: Identify duplicates in pivot column

    Check if the 'Type' column has duplicate entries for the same row context.
  2. Step 2: Understand pivot requirements

    Pivoting requires unique keys or an aggregation function to handle duplicates.
  3. Final Answer:

    There are duplicate values in the pivot column without specifying an aggregation function -> Option A
  4. Quick Check:

    Duplicates without aggregation cause errors [OK]
Quick Trick: Duplicates need aggregation when pivoting [OK]
Common Mistakes:
  • Assuming List.Distinct fixes duplicates automatically
  • Ignoring the need for aggregation with duplicate keys
  • Believing empty tables cause pivot errors

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Power BI Quizzes