Complete the code to connect Power BI to an Excel file.
let Source = Excel.Workbook(File.Contents([1]), null, true)Power BI needs the full file path as a string to connect to an Excel file.
Complete the code to load data from a SQL Server database.
Source = Sql.Database([1], "SalesDB")
The first argument is the server name as a string, like "ServerName".
Fix the error in the code to connect to a CSV file.
Source = Csv.Document(File.Contents([1]), [Delimiter=",", Columns=5, Encoding=1252, QuoteStyle=QuoteStyle.None])
The file path must be a string with quotes, like "C:\Data\SalesData.csv".
Fill both blanks to filter data after connecting to a table.
FilteredRows = Table.SelectRows(Source, each [Region] [1] "West" and [Sales] [2] 1000)
We want rows where Region equals "West" and Sales is greater than 1000.
Fill all three blanks to create a calculated measure for total sales.
TotalSales = CALCULATE(SUM([1][[2]]), [3])
The measure sums the Amount column from SalesData, filtered to Region "East".
