Alteryx Designer Desktop Discussions

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

Multifield Formula

ajanayak
8 - Asteroid

How to use Multi field formula, I have used but confused when trying to use formula for Multi field tool, Any help would be appreciated.

 

ajanayak_0-1674474792271.png

 

 

 

Thanks

AJAY

6 REPLIES 6
FinnCharlton
13 - Pulsar

Your formula syntax is incorrect at the moment. It needs to be:

 

IF

*True or false condition*

THEN

*Value if condition is true*

ELSE

*Value if condition is false*

ENDIF

 

What are you trying to achieve with this formula? Let me know and I'll help you write it.

JamesCharnley
13 - Pulsar

@ajanayak  as the name suggests the multi-field formula is just applying a formula to many fields at once to save you time. It follows all the same rules as the normal formula tool. What are you trying to achieve in yours?

 

Your current error is because you have nothing after your THEN before the ELSE.

ajanayak
8 - Asteroid

I have attached the file here where the input and output is given.

BS_THE_ANALYST
14 - Magnetar
14 - Magnetar

BS_THE_ANALYST_0-1674474972419.png

You just need to do a couple of things in your IF statement

1. When you write THEN .. you don't have anything after it?

So you can do the following:

1.1 THEN null()  

1.2 THEN ""  ... this is an empty string, notice that between the "quotes" nothing is inbetween them. So you are assigning 'nothing' to them.

 

2. For your ELSE statement, you want to say ELSE 'f' .. you need to put the f in quotes because this tells the computer it is string. Basically, assign it the letter 'f'

 

3. The last thing, your column data type is set to int64. This means the data allowed in this column has to be a whole number or the value null(). If you want to be able to assign values to the letter 'f' (using your ELSE logic). You will need to change this column's datatype to V_STRING or V_WSTRING. A numeric column can't contain string. See attached for where to make the adjustment. Change the INT64

BS_THE_ANALYST_1-1674475283387.png

 

All the best,
BS

LinkedIN

Bulien
Qiu
21 - Polaris
21 - Polaris

@ajanayak 

To me, it is more a Multi-row tool application.

0123-ajanayak.PNG

ShankerV
17 - Castor

Hi @ajanayak 

 

Please find the expected output.

 

ShankerV_0-1674476221596.png\

 

ShankerV_1-1674476230904.png

 

Many thanks

Shanker V

 

Labels
Top Solution Authors