Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to load data into Power Query.
Excel
let Source = Excel.CurrentWorkbook(){[Name=[1]]}[Content] in Source Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using sheet names instead of table names
Forgetting quotes around the name
✗ Incorrect
Power Query loads data from named tables like "Table1" in Excel.
2fill in blank
mediumComplete the code to remove empty rows in Power Query.
Excel
CleanedData = Table.SelectRows(Source, each [1] <> null) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using functions that don't apply to the column type
Checking for empty string instead of null
✗ Incorrect
Checking if the value in [Column1] is not null removes empty rows.
3fill in blank
hardFix the error in the code to change data types.
Excel
ChangedType = Table.TransformColumnTypes(Source, {{"Date", [1]) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using text or number type instead of date
Missing the type keyword
✗ Incorrect
To convert a column to date type, use type date.
4fill in blank
hardFill both blanks to filter rows where sales are greater than 1000.
Excel
FilteredRows = Table.SelectRows(Source, each [[1]] [2] 1000)
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong column name
Using less than operator instead of greater than
✗ Incorrect
We filter rows where the Sales column is greater than 1000.
5fill in blank
hardFill all three blanks to create a new column with doubled sales values for sales above 500.
Excel
AddedColumn = Table.AddColumn(Source, "DoubleSales", each if [[1]] [2] [3] then [Sales] * 2 else [Sales])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong operator
Using wrong threshold value
Checking wrong column
✗ Incorrect
This adds a new column doubling sales only if sales are greater than 500.