Forum Discussion
Positive & Negative duplicate values
- Anonymous8 years ago
There are two type conversions in my code.
One is changing the type of cost from text to currency as when you manuall enter data by default is text typed. This is to allow numeric functions to be applied later such as sum average etc.
The second transformations is inside the custom function.
Number.Abs() requires that you enter a numeric type for it to work, so to ensure that it is a numeric type going in I have wrapped the column in Number.From() which converts to a numeric type.
I do not think either of these steps should cause an error however you should ensure that the cost column is in either currency or decimal type just to be sure.
There are two type conversions in my code.
One is changing the type of cost from text to currency as when you manuall enter data by default is text typed. This is to allow numeric functions to be applied later such as sum average etc.
The second transformations is inside the custom function.
Number.Abs() requires that you enter a numeric type for it to work, so to ensure that it is a numeric type going in I have wrapped the column in Number.From() which converts to a numeric type.
I do not think either of these steps should cause an error however you should ensure that the cost column is in either currency or decimal type just to be sure.