Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Replacing Value in a separate column based on certain conditions

Mostafa_Anwar
8 - Asteroid

Hello All,

 

How do i replace value in a column based on a different conditions,

Example: In case of Department Type called Sales and PO value called NO and No value in a separate column, How do i replace it as NA instead of NO?

i have attached example of my data, Your help will be highly appreciated.  

8 REPLIES 8
Thableaus
17 - Castor
17 - Castor

Hi @Mostafa_Anwar

 

I'm not sure if I understood you well, but this is the solution that I thought.

 

Capturar.PNG

WF appended.

 

Cheers,

 

 

Mostafa_Anwar
8 - Asteroid

Thanks @Thableaus for your reply, Your solution will change the all value in all rows in case of the value NO, Sorry let me clarify more, I want only the value against PO in case of NO to be changed to NA not for all.

 As per the example below to change NO value against PO field only.

Untitled1.jpg

Thableaus
17 - Castor
17 - Castor

Hey @Mostafa_Anwar

 

What I didn't really understand is that this "Field against" definition.

 

Do you mean the field right beside where a PO is found?

 

In this case you printed for me, the record "Yes" was actually replaced by "NA".

 

I'm still a bit confused, but I sure wanna help you out.


Cheers,

Mostafa_Anwar
8 - Asteroid
I mean that there is a value in another column beside PO either Yes or No and I want to replace this value with NA in case of No, You helped me indeed however I have noticed that all fields changed as well such as the value beside Invoice it was No and changed with NA so Is there a formula to change the value beside Po only in case of No, Also PO value might be in a column A and in another row will be in column B so how to solve this, Thanks in advance!
Thableaus
17 - Castor
17 - Castor

Hi @Mostafa_Anwar

 

I replaced the "Yes" beside the PO to "NO", just to test it.

 

See if this works well for you.

 

Capturar.PNG

 

Cheers,

Mostafa_Anwar
8 - Asteroid

Many thanks Thableaus, This is absolutely what i look for...........

Just last question if you don't mind, How do i add multiple condition in the same provided workflow Example: In case of Type MKT and the field beside "Actual attendee" equal NO and field beside "Invoice" equal NO to be replaced with NA also in case of Type HR and the field beside PO equal NO to be replaced with NA

 

Thanks,

    

Thableaus
17 - Castor
17 - Castor

@Mostafa_Anwar

 

See WF appended and modified with your requests.

 

NEW Wf.PNGMulti-Row Formula.PNG

 

Cheers,

 

Mostafa_Anwar
8 - Asteroid

Many thanks Thableaus for your support, This is helped me a lot and apologize for my late in respond as this workflow takes a while to apply on my dataset, Also i am a new user using Alteryx.

I have another question, Attached is my dataset, I want to use use formula stating that in case of the cell beside PO = NO and Cell beside Invoice = Yes OR the cell beside PO = Yes and Cell beside Invoice = No then replace NO with Yes, Else [Value] ENDIF.

 

Thank You.    

Labels