Alteryx Designer Desktop Discussions

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

Value changing after converting column from DOUBLE to STRING

madhurinani
8 - Asteroid

Hello All,

I am facing an error as noticed by the client recently.

Step 1: I have created a new category column which is an nested if-else condition. Hence all the columns are in DOUBLE format. Works fine as expected.

Step 2: I convert the 3 columns in STRING as I need to append % symbol. (image attached)

Step 3: I create 3 formulas to append the %symbol for all the columns. 

 

Problem: When I use the step 2 SELECT logic to convert the from DOUBLE to STRING, my values in the Change column change.

Attached pics.

 

How Can i resolve this issue. Any help would be appreciated.
Ideally the value should be 0.08% only

 

11 REPLIES 11
PhilipMannering
16 - Nebula
16 - Nebula

Does using the second argument to specify the number of decimal places in ToString(x, numDec) solve this issue?

FrederikE
13 - Pulsar

I am not sure what is causing this error, but I would round the numbers as a final step after all calculations are done.

This might resolve the issue you are having.

Emmanuel_G
13 - Pulsar

Hi @madhurinani 

 

Do you want something like this ?

Emmanuel_G_0-1657622375393.png

 

 

madhurinani
8 - Asteroid

It didnt work. I have also uploaded the workflow for your reference

madhurinani
8 - Asteroid

@Emmanuel_G wrote:

Hi @madhurinani 

 

Do you want something like this ?

Emmanuel_G_0-1657622375393.png

 

 


It didnt work. I have also uploaded the workflow for your reference

madhurinani
8 - Asteroid

I have uploaded the workflow, if someone can help using that as reference.

The value changes during the 2nd last step (Select formula)

Emmanuel_G
13 - Pulsar

@madhurinani 

 

Thank you ! Can you share the file A too please ?

PhilipMannering
16 - Nebula
16 - Nebula

Don't change the data type in the select for the percentages. Instead create a new field in the Formula Tool where you convert the numerical value to a string. Something like,

ToString([PQ FD %], 2)+'%'

 

madhurinani
8 - Asteroid

Raw file also attached

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels