Alteryx Designer Desktop Discussions

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

Rounding issues based on data type

MHS
8 - Asteroid

Hello Community!

 

I have a problem that I was hoping that someone could help me with.  I am calculating a ratio thru the multi-row tool  and attempting to export the field as an integer field type, but the tool continues to throw an error that the field resulted in a string but the field is numeric.  I can export the field as a string, but when I change the field type back to an integer with the select tool  I run into a rounding issue with the ratio which does not allow me to convert to a percentage.  Any help or tips would be greatly appreciated.

 

Thanks, 

 

Matt

6 REPLIES 6
Emil_Kos
17 - Castor
17 - Castor

Hi @MHS ,

 

Do you use "" in your formula? 


If yes you should remove them. 


Maybe you can share a workflow with a data sample or at least a screen of the multi-row formula configuration. 

MHS
8 - Asteroid

Hi Emil_Kos,

 

Thanks for the help on this!

 

Below is the expression and a screenshot of the multi row tool as it is set up.  

 

IF [Average - Ignore 0's_New open status]>= 1 THEN [Average - Ignore 0's_New open status]/[Row+7:Sum_Consolidated status duration]
ELSEIF [Average - Ignore 0's_Sprint ready duration seconds]>= 1 THEN [Average - Ignore 0's_Sprint ready duration seconds]/[Row+6:Sum_Consolidated status duration]
ELSEIF [Average - Ignore 0's_3 Amigos duration seconds]>= 1 THEN [Average - Ignore 0's_3 Amigos duration seconds]/[Row+5:Sum_Consolidated status duration]
ELSEIF [Average - Ignore 0's_In progress duration seconds]>= 1 THEN [Average - Ignore 0's_In progress duration seconds]/[Row+4:Sum_Consolidated status duration]
ELSEIF [Average - Ignore 0's_Story signoff duration seconds]>= 1 THEN [Average - Ignore 0's_Story signoff duration seconds]/[Row+3:Sum_Consolidated status duration]
ELSEIF [Average - Ignore 0's_Release testing duration seconds]>= 1 THEN [Average - Ignore 0's_Release testing duration seconds]/[Row+2:Sum_Consolidated status duration]
ELSEIF [Average - Ignore 0's_Release ready duration seconds]>= 1 THEN [Average - Ignore 0's_Release ready duration seconds]/[Row+1:Sum_Consolidated status duration]
ELSE "" ENDIF

 

MHS_0-1614720918823.png

 

apathetichell
18 - Pollux

Question - are you sure that all of the fields you are calling on are integers? If one of them is a string type you would get this error. It's always good to double check. If you can post a screengrab of a filter tool right before your mutli-row that might help people take a glance at what types of fields you're bringing in.

 

I'd also recommend not using an integer for a division exercise like this. I'd use a double - if it needs to be an integer - you may want to consider something like the floor() function...

apathetichell
18 - Pollux

Also - your final else uses """ which is a definitely string. Set it for 0 or null(). I believe it currently has 3 quotes - not 2 so it's a set up to create a single " currently.

grazitti_sapna
17 - Castor

Hi @MHS,

 

Can you try this expression and let me know if it solves your issue.

 

IF [Average - Ignore 0's_New open status]>= 1 THEN [Average - Ignore 0's_New open status]/[Row+7:Sum_Consolidated status duration]
ELSEIF [Average - Ignore 0's_Sprint ready duration seconds]>= 1 THEN [Average - Ignore 0's_Sprint ready duration seconds]/[Row+6:Sum_Consolidated status duration]
ELSEIF [Average - Ignore 0's_3 Amigos duration seconds]>= 1 THEN [Average - Ignore 0's_3 Amigos duration seconds]/[Row+5:Sum_Consolidated status duration]
ELSEIF [Average - Ignore 0's_In progress duration seconds]>= 1 THEN [Average - Ignore 0's_In progress duration seconds]/[Row+4:Sum_Consolidated status duration]
ELSEIF [Average - Ignore 0's_Story signoff duration seconds]>= 1 THEN [Average - Ignore 0's_Story signoff duration seconds]/[Row+3:Sum_Consolidated status duration]
ELSEIF [Average - Ignore 0's_Release testing duration seconds]>= 1 THEN [Average - Ignore 0's_Release testing duration seconds]/[Row+2:Sum_Consolidated status duration]
ELSEIF [Average - Ignore 0's_Release ready duration seconds]>= 1 THEN [Average - Ignore 0's_Release ready duration seconds]/[Row+1:Sum_Consolidated status duration]
ELSE null() ENDIF

Sapna Gupta
MHS
8 - Asteroid

Thanks for the help!

 

Will need to keep this statement in mind when I stumble across a rounding error again in the future.

 

Matt

Labels