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.
Are you trying with the code I posted above or are you trying to apply it to your own data?
- Kent_Heng8 years agoFrequent VisitorHi Thomas, Following your steps in my own dataset. I did notice in your below table, where you convert the cost to currency type? Or something?
- Anonymous8 years agoNot applicable
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.