diff --git a/src/queries/catalog/monthly-cost-change-percentage.kql b/src/queries/catalog/monthly-cost-change-percentage.kql index 0e36c8fbd..ea4664337 100644 --- a/src/queries/catalog/monthly-cost-change-percentage.kql +++ b/src/queries/catalog/monthly-cost-change-percentage.kql @@ -22,5 +22,5 @@ Costs() | extend PreviousBilledCost = prev(BilledCost) | extend PreviousEffectiveCost = prev(EffectiveCost) | project ChargePeriodStart, - BilledCostChangePct = iff(isempty(PreviousBilledCost), 0.0, toreal((BilledCost - PreviousBilledCost) * 100.0 / PreviousBilledCost)), - EffectiveCostChangePct = iff(isempty(PreviousEffectiveCost), 0.0, toreal((EffectiveCost - PreviousEffectiveCost) * 100.0 / PreviousEffectiveCost)) \ No newline at end of file + BilledCostChangePct = iff(isempty(PreviousBilledCost) or PreviousBilledCost == 0.0, 0.0, toreal((BilledCost - PreviousBilledCost) * 100.0 / PreviousBilledCost)), + EffectiveCostChangePct = iff(isempty(PreviousEffectiveCost) or PreviousEffectiveCost == 0.0, 0.0, toreal((EffectiveCost - PreviousEffectiveCost) * 100.0 / PreviousEffectiveCost)) \ No newline at end of file