Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Get the total amount of the column by not using wstring as datatype

RichardAlt
8 - Asteroid

Hi Guys! I know this is a easy question, I'm getting the total amount of the column, Yes I already did it. I'm getting the total amount using Summarize Tool, But I need to convert the value to wstring. Now this is the issue, When I got the output file and check the value, Of course the column which I converted to wstring will be text.

 

I have no issue's in getting the total amounts using wstring datatype.

 

As you can see when I highlighted the column it only counted the rows. But no amounts, This is because the column is text.

RichardAlt_1-1588520524807.png

 

This one I set the column in alteryx as fixed decimal datatype. When I highlighted the row it computes the average and the sum. This is what I want to be the output. But the issue is, It's not computing the total amount and does not have 2 decimals places.

RichardAlt_2-1588520715708.png

 

I need to total the amount of column not using wstring datatype or get the total amount and convert the column to number. Like I need in image number 2.

 

I've attached my sample source file and workflow. Thank you!

 

6 REPLIES 6
grossal
15 - Aurora
15 - Aurora

Hi @RichardAlt,

 

can you explain why you have to convert the numbers into text in the first place? I looked into your data and tried to figure out a reason why you have to do this, but I can't find one. 

 

Best

Alex

RichardAlt
8 - Asteroid

Because is not getting sum up in the summarize tool.

zajaccount
9 - Comet

Hi

 

I am not sure as to why you would like to convert these numbers to text,could you please explain?

 

You could change this parameter:

 

ToString(ToNumber([Remaining Balance (Amount less Submitted)]), 2, 1, ".") to "0" so that no thousands delimiter is specified. Then, you could use a select to convert the field type to a numeric.

 

You should also then update the properites in the table report to show 2 decimal places:

 

zajaccount_0-1588524189327.png

Please find your adjusted workflow - let me know if this works for you.

grossal
15 - Aurora
15 - Aurora

I still don't understand it to be honest.

 

grossal_1-1588524554761.png

 

I removed the conversion to text and outputted it and it looks basically the same as your original output, but you can sum up everything as you are used to in Excel. (I did not fixe the exact sheet naming for now)

 

See attached workflow. What do you think?

 

Best

Alex

AbhilashR
15 - Aurora
15 - Aurora

Hi @RichardAlt, for numerical columns, you could keep the datatype to Double throughout the workflow and finally introduce Decimal places for these columns within the Table tool.  

AbhilashR_0-1588524431197.png

In the attached modified workflow, I created a copy of the existing Cash Advance Amount column and gave it a Double datatype. I then introduced 2 decimal places for this column within the Table tool, the output of which look like this. 

 

 

 

 

 

RichardAlt
8 - Asteroid

Thank you! It works.

Labels
Top Solution Authors