Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I've seen this error a few times in these forums but I cannot figure out how to apply those solutions to my own error.
Here are what my columns look like:
I have created a custom column using the following language to remove any "divide by zero" errors. All columns have been changed to a "type number" prior to me adding the custom column. Can anyone suggest a solution and explain why the error is produced?
= Table.AddColumn(#"Changed Type", "Custom", each if [Marlinn.Job allocations] and [#"Marlinn.Non-job allocations"] = 0 then [#"Marlinn.Qty on-hand"]
else if [Marlinn.Job allocations] = 0 and [#"Marlinn.Non-job allocations"] <> 0 then [#"Marlinn.Qty on-hand"] - ([Marlinn.Extended cost] / [#"Marlinn.Non-job allocations"])
else if [#"Marlinn.Non-job allocations"] = 0 and [Marlinn.Job allocations] <> 0 then [Marlinn.Job allocations]
[#"Marlinn.Qty on-hand"] - ([Marlinn.Extended cost] / [Marlinn.Job allocations])
else
[#"Marlinn.Qty on-hand"] - ([Marlinn.Extended cost] / [Marlinn.Job allocations]) + ([Marlinn.Extended cost] / [#"Marlinn.Non-job allocations"]))