Replacing null freight amounts with zero to keep per-order averages correct
You use Power Query Editor to preview a query that contains sales order data in the following columns: • Tax Amount • Sales Order ID • Freight Amount • Subtotal Amount • Total Item Quantity The Sales Order ID column uniquely identifies each sales order. The Subtotal Amount and Total Item Quantity columns are always populated, but the Tax Amount and Freight Amount columns are sometimes null when an order has no associated amount. You need to query the data to identify the following metrics by month: • The average item quantity per order • The average freight amount per order • The maximum item quantity per order How should you modify the query?
Community Votes
100% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
A null freight means the order carried no freight cost, which is a true zero for averaging purposes — replacing nulls with 0 keeps every order in the per-order average, while removing rows would silently drop orders from all three metrics.
Sales order data is aggregated by month to produce average item quantity per order, average freight per order, and maximum item quantity per order, while Tax and Freight columns are sometimes null for orders without those amounts.
Removing null rows in Freight or Tax — deleting rows discards the Sales Order ID, quantities, and subtotals of those orders, corrupting the quantity averages and maximums that depend on them.
Community Discussion (9 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
The metrics are per-order aggregates over all orders in a month. A null in Freight Amount signifies the order has no associated freight — semantically zero — so replacing those nulls with 0 (D) lets the average freight per order include every order with its true zero cost. The quantity columns are always populated, so quantity metrics remain exact, and no order is lost.Why the Other Options Are Wrong
Replacing nulls in Total Item Quantity (A) is pointless — the scenario states that column is always populated, so there are no nulls to replace. Removing rows with null Tax Amount (B) would delete entire orders (with their quantities and freight) from every monthly metric merely because tax was absent, distorting all three results. Removing rows with null Freight (C) likewise drops valid orders from the average quantity and maximum quantity calculations — the row-level destruction is the fatal flaw both share.Community Comment Notes
The most-endorsed comment states the essentials: removal is never the solution and quantity is always present, so nulls belong in Freight replaced with 0. A thoughtful reply questions whether zeros distort the freight average, but an order with no freight genuinely contributes zero freight, making the replacement semantically correct.Official Reference
Related Analysis
Practice All PL-300 Questions
Access 116 questions with complete answers and detailed explanations.
View Full PL-300 Practice Test →