Alteryx Designer Desktop Discussions

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

ToNumber issue in a multi row formula

nataliad18
8 - Asteroid

Hey everyone!

 

I hope I can get help on the following:

 

I am trying to use a multirow formula tool and applying there an "IF" formula.

This is what I am trying to do:

 

If [Cycle]="YE" then [Value USD]/[Row-1:Value USD] else "" endif

 

Basically, if the column "Cycle" (string column) says "YE" then take VALUE USD row (Double format) and divide it by its value the row before (also double format). it keeps giving me an error saying that it resulted in a string but the field is numeric and tells me to use ToNumber. I tried adding ToNumber and did this:

 

If [Cycle]="YE" then ToNumber([Value USD])/ToNumber([Row-1:Value USD]) else "" endif

 

as well as this:

 

If ToString([Cycle])="YE" then ToNumber([Value USD])/ToNumber([Row-1:Value USD]) else "" endif

 

Neither of them work. 

 

Does anyone have any idea what the issue is and How I could fix it?

 

Thanks in advance!

Nat

3 REPLIES 3
atcodedog05
22 - Nova
22 - Nova

Hi @nataliad18 

 

Can you provide some sample input and expected output it will help us get a better understanding of the usecase.

nataliad18
8 - Asteroid

I managed to figure out what the problem was - but thanks!! Sorry to have bothered!

atcodedog05
22 - Nova
22 - Nova

Happy to hear it got solved : ) @nataliad18 

Cheers and have a nice day!

Labels