Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
ALTER.NEXT:

Join us on Dec 2 for a half-day virtual analytics + data science event!
US & CA customers only

SAVE YOUR SPOT
It's the most wonderful time of the year - Santalytics 2020 is here! This year, Santa's workshop needs the help of the Alteryx Community to help get back on track, so head over to the Group Hub for all the info to get started!
SOLVED

Comma in output instead of dot

Highlighted
8 - Asteroid

Hi

In my source file  one column is defined like this

 

Input:

Column1

1,111

0,8889

0,75

 

please note :its a comma in between not the dot in source input

When i am reading this in Alteryx the datatype is Double and this comma changes to dot . So it becomes like this

Column1

1.111

0.8889

0.75

My requirement is

  1. I want to print the column 1  values same(with comma) as input file in the output file
  2. I have to apply if else on this column with condition and generate a new column:

IF column1 is greater than  or equal to 1 then it round up to 1

For eg: 1,111 will become 1,00

 

Similarly if column1 is less than  or equal to 0 then it should print this way

0,75 will become 0,75

0,8889 will become 0,89

 

Can you please suggest the solution

Regards

Areeba

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi @areeba 

 

I think this does what you want,

PhilipMannering_0-1605913672543.png

I change the float to a string with commas and at the right dp. See attached.

 

Thanks,

Phil

Highlighted
8 - Asteroid

Hi @PhilipMannering 

 

Thank you for the solution it is exactly i have been looking for.

There are two things

1) if value is 1 or greater than 1 for eg here its 1.1111 then also it should also print 1,00 .As for now it is just showing 1 in output.

for eg:

Column1     Output

1                  1,00

1.1111          1,00

 

 

2) Also , like i mentioned as per my requirement i need to show Column1 also  in my output with Comma  not the Dot. Originally it is a comma in the source file but when i am loading the source file that comma becomes a dot.

 

For eg in Alteryx it is looking like this :

Input 

Column1

1.1111

1

0.75

0.8889

Output which i want including Columnn1

Output

Column1      Output

1,1111           1,00

1                    1,00

0,75               0,75

0.8889            0,89

 

 

I hope i am clear 🙁

 

Thanks

Areeba

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi @areeba 

 

Yes you are clear. I think I have the solution you want attached.

 

Thanks,

Philip 🙂

Highlighted
8 - Asteroid

Hi @PhilipMannering 

 

Thank you for the solution  but I have a little change in formula .

its like 

IF [column1)>1  then 1.00 

elseif [column1]<0.1 then 1.00

else column1

 

its not comma now , its simple dot .

Can you suggest ?

 

Regards

Areeba

 

Highlighted
17 - Castor

Hi @areeba 

 

Is this what you are looking for

 

Output:

atcodedog05_0-1606298011095.png

Formula

if [Column1] > 1 then "1.00"
elseif [Column1] <0.1 then "1.00"
else ToString([Column1], 2, 1)
endif

 

Check and let me know

Highlighted
8 - Asteroid

hi @atcodedog05 

 

Expected Output:

Column1        Output

1                     1.00

1.1111             1.00

0.75                 0.75

0.8889            0.88

0.0278            1.00

 

 

the idea is that if column 1 is greater than 1 then it should print 1.00, if column 1 is less than 0.1 then 1.00 otherwise it picks the actual value of column 1

As per your solution for the value 1 it is coming 1 in output not 1.00 and rest i have explained above.

 

 

 

Highlighted
17 - Castor

Hi @areeba 

 

I checked with your new input i seem to be getting expected output

atcodedog05_0-1606299472765.png

Please do check and let me know🙂

 

 

Highlighted
8 - Asteroid

 @atcodedog05 

 

Yes this is correct , only one thing is if it is 0.8889 then we should pick actual value not rounded values as it is neither greater than 1 nor less than 0.1. we need to pick actual value as it is.

0.8889 ---> 0.88

Highlighted
17 - Castor

Hi @areeba 

 

Rounding is done by Alteryx let me check what i can do.

Labels