Bird
0
0

Given this table:

medium📝 Formula Result Q4 of 15
Power BI - Data Cleaning with Power Query
Given this table:
Product | Jan | Feb
A | 10 | 20
B | 15 | 25

What will be the result after unpivoting the Jan and Feb columns?
A<pre>Product | Jan | Feb A | 10 | 20 B | 15 | 25</pre>
B<pre>Product | JanFeb A | 1020 B | 1525</pre>
C<pre>Product | Attribute | Value A | Jan | 10 A | Feb | 20 B | Jan | 15 B | Feb | 25</pre>
D<pre>Product | Attribute | Value Jan | A | 10 Feb | A | 20 Jan | B | 15 Feb | B | 25</pre>
Step-by-Step Solution
Solution:
  1. Step 1: Understand unpivot output format

    Unpivoting columns Jan and Feb creates two new columns: Attribute (holding original column names) and Value (holding the data).
  2. Step 2: Apply unpivot to given data

    Each product row splits into two rows, one for Jan and one for Feb with corresponding values.
  3. Final Answer:

    Product | Attribute | Value with rows for Jan and Feb per product -> Option C
  4. Quick Check:

    Unpivot result = columns to Attribute and Value rows [OK]
Quick Trick: Unpivot creates Attribute and Value columns from selected columns [OK]
Common Mistakes:
  • Expecting original table unchanged
  • Concatenating values instead of unpivoting
  • Swapping row and column labels

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Power BI Quizzes