🔥 3-day streak
Microsoft Fabric Analytics Engineer Associate137 / 150
Question 137 of 150

You are transforming a sales fact table in a Fabric warehouse. The DiscountRate column contains a mix of NULL values and literal zeros, and the CommissionAmount column is calculated as SalesAmount / DiscountRate. Business rules require that NULL discount rates be treated as 1.0 (no discount) and that dividing by a zero discount rate must not raise an error but instead return NULL. Which single T-SQL expression correctly implements both rules for the calculation?

Reviewed for accuracy · Report an issueNext question