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.
Riny_van_Eekelen
Jan 02, 2024Platinum Contributor
davidmaddock54 Well, you need to remover the " * 100 " bit in the step where you calculate the percentage. That will give you a number like 0.9166666667. Then change to data type to % to get 91.67%. And then round to zero decimals to get to 92%.
davidmaddock54
Jan 02, 2024Brass Contributor
Faceplam.gif. Sometimes when the question is answered, it seems so obvious.
Thank you.
Thank you.