Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
SOLVED

Show negative numbers in parentheses

Meteoroid

Does anyone know of a way (in the Reporting Tools) to show negative numbers in parentheses instead of with a "minus" sign in front of them?  I know that I can convert them to strings, blah blah blah, formula tool blah blah.  I was wondering if there was just a way to change how they are displayed with an option or button click instead of writing formulas.

 

This is kind of a metaphor for my whole career existence.  Being a BI analyst, I have to translate between IT and Operations.  IT sees it as a decoration, a mask on the true value of the data, Operations wants uniformity; it must always be "$   (10)", not "-10".  While this is a minor inconvenience, it makes any financial reporting in Alteryx a bit tedious.  

Highlighted
Director, Customer Enablement
Director, Customer Enablement

@Analyst

The closest I can get you with reporting tool clicks is '$(-10)', but not '$(10)'. Sounds like you are tired of writing the same formula repetitively, and the function to get it exactly as you need it can't be configured in the reporting tools. Have you considered building a macro to do this quickly for you? Attached, I built a quick sample macro that shows allow a user to select all numeric fields to convert to your negative number format and output them as a new field you can use for your reporting. 

Highlighted
Meteoroid

@JoeM,

Thanks for the help, good sir.  You say you can get to '$(-10)' but not '$(10)'.  What about '(10)'?

 

In the mean time, I'm going to try the macro route, that may well do the trick for me.

Highlighted
Meteoroid

Joe, 

I'm looking at the macro and when it does the conversion from '-1,234' to '$(1234)', it loses the comma.  I definitely have to keep the commas in the figures.  Is there a way to retain those?  Thanks again for the help, it is much appreciated.

 
 
Highlighted
Director, Customer Enablement
Director, Customer Enablement

No problem. The tostring() functions has the capability to add decimal places or commas. I updated the macro to reflect what you need: 

tostring([number],<putnumberofdecimalplaceshere>, <put 1 here if commas are desired>) 

Highlighted
Meteoroid

Much obliged my good man.  Now I have one more question if you don't mind.  How did you "mention" my name in your first reply?

Highlighted
Director, Customer Enablement
Director, Customer Enablement

No problem! You can mention people by typing "@" and then being writing their name. 

Highlighted
Atom

This macro file is great and exactly what I need, however once I ran it now my positive numbers lost the comma. Not familiar enough with macro's to know how to add it in. Thanks!

 

Labels