Number Format
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi! I am using ToString to convert numeric values to string in order to add commas and decimals. The problem is I later use a filter >= a numeric value, which no longer works because the field is a string. If I try to convert it back using ToNumber, I lose the commas. Does anyone have a solution for this?
Solved! Go to Solution.
- Labels:
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@JStuhler if you add , to the numeric value in Alteryx it will become string data type, if you want to change back to number then use the formula toNumber(ReplaceChar([Field],",","")) - change the data type to double or any other numeric type
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I tried the formula ToNumber(ReplaceChar([_CurrentField_],","," ")) and it does revert back to a number format, but loses the commas. Withing the formula I get a message with a red X that says "tried to apply string operator to numeric value"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Before adding the commas, create a new field which will keep the original value, now you will have one numeric field and one string, use the numeric field for the Filter purpose and then remove it with a Select tool to remain only with the string field. Just keep it simple by using 2 different fields
