Alteryx Designer Desktop Discussions

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

Multi Row Query

lmilimonka
6 - Meteoroid

I have a question where I need to do an if then else but I need to keep multiple rows. Here is an example:

If merge account=81056 but account = 612204,612205 change account number to 81056 and keep rows for account 612204 and 612205.

 

What would be the expression?

Thanks

6 REPLIES 6
danettedavis
8 - Asteroid

have you tried a formula such as if [Account] In(612204,612205) then 81056 else [Merge Account] endif

apathetichell
19 - Altair

This is probably a Join. It sounds like you are trying to change values in multiple fields based upon a key. this is a join where value from Table A replaces value in Table B. It is a self-Join if A/B are the same table.

lmilimonka
6 - Meteoroid

I will try it this morning and get back to you.

Thanks

Lesia

lmilimonka
6 - Meteoroid

How do I make it dynamic without had coding the account numbers.

 

For Example I can have Merge with Account # be the same as Account Number and sometimes they are different.

Let me know.

lmilimonka
6 - Meteoroid

No, This is all in the same excel file. So basically if the condition matches then I am trying to change the values in multiple rows. I hope this helps.

Thanks

 

apathetichell
19 - Altair

If this is one excel sheet - this is a self-join. Row X Column A (lets call it the key column) matches Row Y Column B (let's call it the Match column) in another row. The value of Row X Column C is then replaced with the value of Row Y Column C. This is done in the Join tool. If you do not understand how this works - post some sample data.

Labels