Forum Discussion
davidmaddock54
Dec 26, 2023Brass Contributor
Removing NaN and Infinities in Power Query
Hi Folks, I've read a few possible solutions to this, but can't work out how to add them to the default formulas for add column etc. Staff enter data on the My Day Entry worksheet, it then ge...
- Dec 27, 2023
As an example, change the first "Inserted Division" step to:
Table.AddColumn(#"Filtered Rows", "Division", each if [Practice Teaching] <> 0 then [Effective Praise] / [Practice Teaching] else 0, type number)
This will test if [Practice Teaching] is not equal to zero, then perform the division else return zero. You need to do something similar to the "Inserted Percent Of" step. Do that and all following calculations will go just fine.
Lorenzo
Dec 27, 2023Silver Contributor
Alternatively:
#"Inserted Division" = Table.AddColumn(#"Filtered Rows", "Division", each
Value.Divide(
[Effective Praise],
if [Practice Teaching] = 0 then null else [Practice Teaching]
),
type number
),