Change V_WString data to double after adding comma
- 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
Hello,
once i add comma to output through Alteryx (following formula) -
if [_CurrentField_]<0 then Replace("("+ToString([_CurrentField_],2,1)+")","-","") else ToString([_CurrentField_],2,1) endif
Issue-
all data change into string. so in my output file number come as "Number stored as text" with a green triangle sign on upper left corner.
expectation-
now i need to change all these data from "Number stored as text" to double.
- Labels:
- Data Investigation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Can you show us an example of your data and your desired output so we can better understand?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Please see attachment and we want to remove that upper left corner green triangle and convert it to numeric so we can use these data for mathematical calculations.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Once you add any commas or punctuation to the field it becomes a string. If you want to see the Comma in Excel, i would format the sheet in Excel and save it. Then in your Alteryx Output Tool check the Preserve Formatting box and set the range of your data. Once the data is overwritten on the destination file it will keep the commas. But doing so in Alteryx will turn it into a string field as it now has string characters in the field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This ^
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@cjaneczko Hello,
I tired but still same issue. i try to change to template file as you said but didn't work. not sure what went wrong. is there anything else i need to do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Did you set the range in the Output Tool? It wont preserve the formatting unless the range is set, even with the box checked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@cjaneczko Hello,
Sounds like its working but some first few lines have no commas (first two lines product A & B).
Type | Q1 | Q2 |
Product A | 458456 | 859745 |
Product B | 215486 | 548798 |
Product C | 506,458.25 | 894,589.89 |
Product D | 950,205.85 | 124,589.25 |