NaN error when dividing columns

GreenBoy

New member
Joined
Apr 13, 2015
Messages
26
Reaction score
0
Points
0
Excel Version(s)
Office 365
Hi
Im getting the NaN error in the results when I add a column using the Divide function.

I know this is because both columns can contain a 0 (Zero) value and the Nan is showing this - I have tried using the Replace Errors function on this column, but this does not work on NaN.

I need to show the rows that have Zero in them, but cant have errors as this causes problems back in Excel.

What else can I do to remove the NaN - is there an If Error type function to wrap the Table.AddColumn function in?

Thanks
Dave (PQ Noob)
 
how about
Code:
= Table.AddColumn(#"LastStep", "DividedColumnName", each if [denominator] = 0 then 0 else [numerator]/[denominator])
 
That works - thank you.
 
Back
Top