How to convert - negative symbol into () Accounting format in Alteryx?
- 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 Great Analytics Minds:
Good afternoon. How can I convert - symbol into () in a column?
Current value | How I want to show |
-2500 | (2500) |
-350 | (350) |
800 | 800 |
Appreciate your help.
Thanks
Solved! Go to Solution.
- Labels:
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @Kinetic_analytics, in order to achieve this result you'll need to sacrifice the numeric data type as you can't have this display without creating a string. To actually get to this format you'll want to use something along the following lines where you check that the value is negative and if so, strip away the - sign and bracket the value:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Brilliant! Thank you. :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@DataNath Do you have any other solution? Thanks :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Kinetic_analytics as with most things in Alteryx, there's a bunch of ways you could tackle this. As for adding extra tools etc, I don't think that makes sense as it can be handled more than fine within the Formula tool itself. However, here's a few ways using various different string functions that lead to the same outcome:
Of course, all of these could also be turned into immediate if (IIF) statements, taking the form of IIF(Condition, Outcome_if_true, Outcome_if_false), instead of writing them in the standard way as I have. I find writing them out in full tends to be more reader/user-friendly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
That is right. Thanks again for sharing the knowledge. :)
