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.

How to convert the number into accounting format and need to be in integer format

santhoshg2409
5 - Atom

Hi Team,

 

Can someone help me in getting this solution, The negative number -4 should be converted into (4) and it should be in integer format. 

Below is the image and attachment added.

 

Thanks in advance. 

 

santhoshg2409_0-1628275278790.png

 

 

Regards,

Santhosh G

 

9 REPLIES 9
Emil_Kos
17 - Castor
17 - Castor

Hi @santhoshg2409,

 

You need to have data in string format to make it looks like you want. A number is a number in Alteryx you need to change it to string format. 

 

So you can write something like IF [Field1]>0 Then "("+ TostringI([Field1])+")" ELSE Tostring([Field1]) ENDIF. 

 

I know that isn't the answer that you wanted to receive but I don't think you can keep number and accomplish the desired result. 

 

 

Luke_C
17 - Castor
17 - Castor

Agree with @Emil_Kos 

 

You could however output the data to a formatted excel template that has this desired format.

Emil_Kos
17 - Castor
17 - Castor

Hi @Luke_C,


The truth is I didn't have an idea about it. Thank you for sharing that. 

atcodedog05
22 - Nova
22 - Nova

It would be great if this gets added has a new feature maybe in table tool 🙂

 

Currently it has a feature where it displays round numbers and actual value is a decimal.

santhoshg2409
5 - Atom

Team,

 

I tired formatted excel template option and some how i didn't get expected output, if someone tired the same or different option. Kindly post your solution.

 

Thanks in advance..!

atcodedog05
22 - Nova
22 - Nova

Hi @santhoshg2409 

 

Here is a step by step guide how you can do it.

 

Step - 1: Have a template output file where is column is formatted

Step - 2: Configure output tool like below.

atcodedog05_1-1628326115339.png

1. Set the sheet range. Sheet range is mandatory for preserve formatting feature.

2. Set output option to overwrite sheet and range.

3. Check preserve formatting option.

 

You can check with the attached workflow and file. 

 

Hope this helps : )

 

santhoshg2409
5 - Atom
Hi @atcodedog05, Thanks for sharing the workflow and your output. But i tried om my machine with the same output but i couldn't get the same. Did you had any excel format changes pre or post the generation of output results. is it not straight forwarded connecting to the output excel format ? or do we need to do anything else. Thanks and Regards, Santhosh G
atcodedog05
22 - Nova
22 - Nova

Hi @santhoshg2409 

 

What is your Alteryx version? And were you able to see preserve formatting option?

santhoshg2409
5 - Atom

Version 2020.3.5  and i have that option of preserve as well. 

i just renamed your userid in the target path, but i am getting negative symbol.

 

Labels
Top Solution Authors