PL-300 · Question #62
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might…
The correct answer is B. No. To ensure nonnumeric values in the CustomerID column are set to 0, using the 'Replace Values' feature in Power Query is not the correct approach.
Question
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You have a query for a table named Sales. Sales has a column named CustomerID. The Data Type of CustomerID is Whole Number. You refresh the data and find several errors. You discover that new entries in the Sales table contain nonnumeric values. You need to ensure that nonnumeric values in the CustomerID column are set to 0. Solution: From Query Editor, select the CustomerID column and click Remove Errors. Does this meet the goal?
Options
- AYes
- BNo
How the community answered
(17 responses)- A29% (5)
- B71% (12)
Why each option
To ensure nonnumeric values in the CustomerID column are set to 0, using the 'Replace Values' feature in Power Query is not the correct approach.
If the solution were 'Yes', it would imply that 'Replace Values' can handle and replace error values, which it cannot directly do; it only replaces specified existing values, not errors resulting from data type mismatches.
'Replace Values' is used to find specific existing values and replace them with new ones; it cannot inherently detect and replace *errors* that arise from nonnumeric values in a 'Whole Number' column with a default value like 0. Instead, a dedicated 'Replace Errors' function is required to handle data type conversion failures.
Concept tested: Power Query Replace Values vs. Replace Errors
Source: https://learn.microsoft.com/en-us/power-query/replace-values
Topics
Community Discussion
No community discussion yet for this question.