Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Currency format output for negative values

Ranjith_udaykumar
7 - Meteor

In table tool we can add formats , prefixes depending on column value using column rules.

Is there is a way to show the negative values within Parenthesis and remove the minus sigh in the number (same as currency format in Excel) ? 

3 REPLIES 3
DataNath
17 - Castor
17 - Castor

@Ranjith_udaykumar I'm not aware of any single-click method of doing this. Afaik, you'd have to create a field like so with an expression along the lines of the following and use that:

 

 

 

if [Amount] < 0 then '$(' + Trimleft(ToString([Amount]),'-') + ')' else '$'+tostring([Amount]) endif

 

 

 

DataNath_0-1656425387991.png

DataNath_1-1656425395108.png

 

Edit: You don't actually need the extra formula - can just use this as a column rule in the Table tool:

 

DataNath_2-1656425523847.png

DataNath_3-1656425550809.png

 

 

Ranjith_udaykumar
7 - Meteor

If we change the value to string, the user can not perform numeric calculations. I want to keep it as number and display it without negative symbol. Instead place it within paranthysis.

DataNath
17 - Castor
17 - Castor

I don't think this is possible in Alteryx - the option to just convert - to () isn't a thing and to do it manually you'd always need to output as a string because of the () characters but I'll of course leave the floor open in case anyone knows otherwise.

Labels
Top Solution Authors