Forum Discussion
Adding custom column with If function
- 6 years ago
is the [Recence] field a string? if so, it should say
if Number.From([Recence]) < 30, etc.
You cannot compare numbers to text. You will get errors. I suspect it is because before you were getting no errors, so [Recence] must be text as well.
Additionally, if [Recence] should be a number all the way round, just convert the field to a number. In the upper left of the column it probalby has ABC for text. Click on that and convert it to either a decimal number or whole number. Then you don't have to use Number.From() around it. Do that very early in your Power Query steps, before adding any custom columns.
Putting quotes round the values will make them get treated as text. You'll get some unusual behaviour. You want to treat those values as numbers