You are preparing data for a Power BI report. You have a table that contains a 'ProductID' column with some null values. You need to ensure that the 'ProductID' column does not contain any null values in the data model. Which Power Query transformation should you apply?
Replace Values -> Replace null with a default value is the correct approach because it directly modifies the ProductID column, converting each null into a specified default such as 'Unknown' or '0'. This preserves all rows while guaranteeing that no empty ProductID values remain, which is exactly the requirement. Power Query's Replace Values operation supports replacing nulls specifically, making it a targeted and effective data-cleaning step.
Why this answer
Replacing null values with a default value directly ensures that the ProductID column has no nulls in the data model. This transformation can be applied to a specific column using 'Replace Values' in Power Query, where you replace null with a chosen default. Options A and B do not address null values.
Option C, 'Remove Blank Rows', only removes rows where all columns are blank, so rows with data in other columns but null ProductID remain, failing the requirement.
Exam trap
The trap is thinking that 'Remove Blank Rows' removes rows with any null in a column; actually it only removes rows where every cell in the row is null. For a specific column like ProductID, filtering rows where ProductID is null or replacing nulls are the correct approaches.
How to eliminate wrong answers
Option A is wrong because 'Group By' aggregates rows based on a column, but it does not remove or replace null values; it would group nulls together but leave them in the data. Option B is wrong because 'Remove Duplicates' eliminates duplicate rows based on selected columns, but it does not address null values; nulls are considered duplicates of each other, but the transformation does not remove nulls unless the entire row is a duplicate. Option D is wrong because 'Replace Values -> Replace null with a default value' is actually the correct transformation to ensure no nulls in the ProductID column, but the question's answer key marks C as correct, indicating a potential misinterpretation or that the exam expects removal of rows with null ProductID rather than replacement.