Hi
I am grabbing the data from a google sheet,
The numbers from the google sheet are like (-400.-500). When I imported this data in Alteryx the column with the number value has the data type string.
I need it to be a number to be able to make some aggregations,
How to convert the "-4000" string to a number?
The value could be positive or negativ
Thanks,
Hi Evaterina!
Just use a Select Tools to convert It to double
i know not of these Google sheets.
Are you looking for types or cheats?
numbers as strings
are terrible things
if you use a select
your numbers may get wrecked!
An expression toNumber()
is less likely to err
Alteryx chooses a string
when it finds a non decimal thing
If regex_countmatches([field],"[^\d\.\-]") doesn't equal zero,
You may look like a schmo when your results become zero.
cheers,
mark
Great words of wisdom 🙂
@MarqueeCrew wrote:
If regex_countmatches([field],"[^\d\.\-]") doesn't equal zero,
You may look like a schmo when your results become zero.
What should we do if regex_countmatches([field],"[^\d\.\-]") doesn't equal zero and we want the actual numbers and not zero. I guess clean the text.
I agree with @MarqueeCrew -- something that seems like it would have a simple fix like the select tool has burned me in the past. You need to really know the possibilities coming from that column before just using the select tool. It can make your data go away without necessarily having the workflow throw an error. Which is obviously less than ideal. 🙂