0
0
Power BIbi_tool~10 mins

Header promotion 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 promote the first row as headers in Power Query.

Power BI
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    PromotedHeaders = Table.[1](Source)
in
    PromotedHeaders
Drag options to blanks, or click blank then click option'
APromoteHeaders
BTable.PromoteHeader
CTable.PromoteHeaders
DPromoteHeader
Attempts:
3 left
💡 Hint
Common Mistakes
Duplicating the 'Table.' prefix by using 'Table.PromoteHeaders'.
Misspelling the function name as 'PromoteHeader'.
Using lowercase letters incorrectly.
2fill in blank
medium

Complete the code to promote headers and change the data type to text in Power Query.

Power BI
let
    Source = Csv.Document(File.Contents("data.csv")),
    PromotedHeaders = Table.[1](Source),
    ChangedType = Table.TransformColumnTypes(PromotedHeaders,{{"Column1", type text}})
in
    ChangedType
Drag options to blanks, or click blank then click option'
ATable.PromoteHeaders
BPromoteHeaders
CPromoteHeader
DTable.PromoteHeader
Attempts:
3 left
💡 Hint
Common Mistakes
Duplicating the 'Table.' prefix by using 'Table.PromoteHeaders'.
Using singular 'PromoteHeader' instead of plural.
Trying to change type before promoting headers.
3fill in blank
hard

Fix the error in the code to correctly promote headers in Power Query.

Power BI
let
    Source = Excel.CurrentWorkbook(){[Name="Sales"]}[Content],
    PromotedHeaders = Table.[1](Source, [PromoteAllScalars=true])
in
    PromotedHeaders
Drag options to blanks, or click blank then click option'
APromoteHeader
BPromoteHeaders
CPromoteHeaderss
DPromoteHeaders!
Attempts:
3 left
💡 Hint
Common Mistakes
Misspelling the function name.
Adding extra characters like '!' or extra 's'.
Using singular form 'PromoteHeader'.
4fill in blank
hard

Fill both blanks to promote headers and remove errors in Power Query.

Power BI
let
    Source = Csv.Document(File.Contents("data.csv")),
    PromotedHeaders = Table.[1](Source, [2]),
    CleanedData = Table.RemoveRowsWithErrors(PromotedHeaders)
in
    CleanedData
Drag options to blanks, or click blank then click option'
APromoteHeaders
BPromoteHeader
C[PromoteAllScalars=true]
D[RemoveErrors=true]
Attempts:
3 left
💡 Hint
Common Mistakes
Using singular 'PromoteHeader' instead of plural.
Using incorrect option '[RemoveErrors=true]'.
Omitting the option record.
5fill in blank
hard

Fill all three blanks to promote headers and change column types in Power Query.

Power BI
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    PromotedHeaders = Table.[1](Source, [2]),
    ChangedType = Table.TransformColumnTypes(PromotedHeaders, {{"Date", [3])
in
    ChangedType
Drag options to blanks, or click blank then click option'
APromoteHeaders
B[PromoteAllScalars=true]
Ctype date
DPromoteHeader
Attempts:
3 left
💡 Hint
Common Mistakes
Using singular 'PromoteHeader' instead of plural.
Omitting the option record.
Using incorrect data type like 'type text' instead of 'type date'.