Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to connect Power BI to an Excel file.
Power BI
let Source = Excel.Workbook(File.Contents([1]), null, true) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to put the file path in quotes
Using just the file name without path
✗ Incorrect
Power BI needs the full file path as a string to connect to an Excel file.
2fill in blank
mediumComplete the code to load data from a SQL Server database.
Power BI
Source = Sql.Database([1], "SalesDB")
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using database name instead of server name
Missing quotes around server name
✗ Incorrect
The first argument is the server name as a string, like "ServerName".
3fill in blank
hardFix the error in the code to connect to a CSV file.
Power BI
Source = Csv.Document(File.Contents([1]), [Delimiter=",", Columns=5, Encoding=1252, QuoteStyle=QuoteStyle.None])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Missing quotes around file path
Using relative path without quotes
✗ Incorrect
The file path must be a string with quotes, like "C:\Data\SalesData.csv".
4fill in blank
hardFill both blanks to filter data after connecting to a table.
Power BI
FilteredRows = Table.SelectRows(Source, each [Region] [1] "West" and [Sales] [2] 1000)
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong comparison operators
Mixing up equality and inequality
✗ Incorrect
We want rows where Region equals "West" and Sales is greater than 1000.
5fill in blank
hardFill all three blanks to create a calculated measure for total sales.
Power BI
TotalSales = CALCULATE(SUM([1][[2]]), [3])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong table or column names
Missing filter condition or using ALL incorrectly
✗ Incorrect
The measure sums the Amount column from SalesData, filtered to Region "East".