Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.

Alteryx Designer Desktop Discussions

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

Is there a way to format numeric values a certain way for my Excel output?

jannis005
7 - Meteor

Hi -

 

Specifically, I like to have my numeric values shown without decimal places with comma separators (i.e. 11,000,000). Is there a function to format accordingly in Alteryx?

 

Thanks.

3 REPLIES 3
CharlieS
17 - Castor
17 - Castor

If a value has "," characters, it is a string field. Excel can apply these commas as a display option, but these characters can only be present in string fields in Alteryx.

 

If you would like values for [Field] to be "1,000,000" and not "1000000.00", use the formula in a string field:

tostring([Field],0,1)

 

The arguments are <Field>,<Decimal Places>,<Binary flag to add thousands commas>

danilang
19 - Altair
19 - Altair

Hi @jannis005

 

Like @CharlieS, said If a number has anything other than the decimal separator that is defined in your regional settings, it's a string.  There is no way in Alteryx to change the display format of the numbers used in the workflow, like you can in  excel  without either converting the field to a string or losing information.   In Excel you can format a group of cells with 0 decimal points and can continue working with fractional part of the number hidden but still available.  The equivalent operation in Alteryx is to change the field type to fixed decimal with size 19.0.  Doing this rounds the fractional part which is then lost.  You can see this by changing a double to fixed decimal and then back to a double.

 

This isn't to say that you can't format values for output or for display in reports.  You just can't within the workflow itself.

 

Dan

jannis005
7 - Meteor

Thanks - I think the reporting tool should be sufficient for formatting purposes.

Labels