community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Comma separated

Meteoroid

Help, I tried a few solutions from the discussions but didn't work. I am trying to comma separate numbers in my columns . The data type selected in my workflow columns is Int64.  I do not need any decimal point. Can someone help me with a simple solution.

Alteryx
Alteryx

Hi @Sophie95,

 

Do you want to place both numbers in one column separated by a comma or replace the decimal points with commas?

 

Both can be done in a formula tool shown in the attached workflow.

 

 

 

 

Pulsar

Hi @Sophie95 

 

If you want Alteryx to treat the fields as numbers, then they need to be without comma separators. Currently, they are all set to string data types, which is why they have decimals.

 

To change to an integer, use a Select tool.

 

To create output with the commas, you'll need to leave the fields as string, and you can try the approach suggested in this thread: https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Formatting-number-with-commas-and-deci...


Let me know if that helps.

 

Cheers!

Esther

Pulsar

@Sophie95 

 

Here's an example of how it works.

 

image.png

 

The Dynamic rename tool just pops the first row of data into the column headings. The Select tool then changes Column-1 and 2 into Integers to lop off the decimal points.

 

A MultiField formula tool lets you apply the same transformation to both of those columns. Where this tool tripped me up is in the Field Size of the new fields. I hadn't originally made them long enough to accommodate all of the commas. So be sure to check off change output type to, and make the string longer.

 

The formula I used is (from the post in my original response):
regex_replace(tostring([_CurrentField_]),"\d{1,3}(?=(\d{3})+(?!\d))","$&,")

 

It involves backward lookups, etc. Let me know if that helps!

 

Cheers,

Esther

Meteoroid

@ ESTHERB47:-

Thank you so much it worked!! You can see my workflow below. I have my end results numbers with commas and ready for reporting. This is my first workflow attempt right to final expected results..

 

Now I want to create the reporting section with the dashboard etc.  I can just continue using the reporting tools where I left off with the final results correct?  Which reporting tools do you recommend and a good reporting video I can watch?

 

Very appreciated!!

Highlighted
Pulsar

Hi @Sophie95 

 

Here's a good video. https://community.alteryx.com/t5/Videos/Introduction-to-Reporting/td-p/47216

Which tools you use depends on how you want to present your data. The Table tool helps you get the data into a beautifully formatted table. Charting tools let you build graphs. The Layout tools (or Visual Layout in the Laboratory tools) can help you put everything together.

You might want to describe how you'd like the report to look in another post here on the community. There are definitely reporting experts who will jump in to help.

 

Cheers!

Esther

Meteoroid

Thanks again!!!

Labels