0
0
Power BIbi_tool~10 mins

Unpivoting columns in Power BI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to unpivot columns in Power Query.

Power BI
Table.UnpivotOtherColumns(Source, {"ID"}, "Attribute", [1])
Drag options to blanks, or click blank then click option'
A"Data"
B"Column"
C"Value"
D"Measure"
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong column name for the values column.
Confusing attribute and value column names.
2fill in blank
medium

Complete the code to select columns to unpivot in Power Query.

Power BI
Table.UnpivotColumns(Source, [1], "Attribute", "Value")
Drag options to blanks, or click blank then click option'
A{"ID", "Date"}
B{"Sales", "Profit"}
C{"Region", "Category"}
D{"Attribute", "Value"}
Attempts:
3 left
💡 Hint
Common Mistakes
Unpivoting identifier columns by mistake.
Including attribute or value columns in unpivot list.
3fill in blank
hard

Fix the error in the unpivot code to correctly rename the new columns.

Power BI
Table.UnpivotOtherColumns(Source, {"ID"}, [1], "Value")
Drag options to blanks, or click blank then click option'
A"Attribute"
B"Value"
C"Column"
D"Measure"
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping the attribute and value column names.
Using invalid column names causing errors.
4fill in blank
hard

Fill both blanks to unpivot columns except "Date" and "Region".

Power BI
Table.UnpivotOtherColumns(Source, [1], [2], "Value")
Drag options to blanks, or click blank then click option'
A{"Date", "Region"}
B"Attribute"
D"Column"
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong column names in the list.
Confusing attribute and value column names.
5fill in blank
hard

Fill all three blanks to unpivot "Sales" and "Cost" columns with custom names.

Power BI
Table.UnpivotColumns(Source, [1], [2], [3])
Drag options to blanks, or click blank then click option'
A{"Sales", "Cost"}
B"Measure"
C"Amount"
D"Value"
Attempts:
3 left
💡 Hint
Common Mistakes
Using default names instead of custom names.
Including wrong columns in unpivot list.