PL-300 • Practice Exam 51
Free PL-300 practice exam — 20 questions with explanations. Set 51. No signup required.
A Power BI developer writes the Power Query M code shown in the exhibit. The code runs successfully but returns an error when the user selects a year from a slicer in the report. The error states: 'Expression.Error: The key did not match any rows in the table.' Which is the most likely cause?
Refer to the exhibit.
```
let
Source = Sql.Database("server", "database"),
SalesTable = Source{[Schema="dbo",Item="Sales"]}[Data],
FilteredRows = Table.SelectRows(SalesTable, each [Year] = 2021),
GroupedRows = Table.Group(FilteredRows, {"ProductID"}, {{"TotalSales", each List.Sum([Amount]), type number}})
in
GroupedRows
```