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

Changing Row Value

Mostafa_Anwar
8 - Asteroid

Hi All,

 

How i can change the row value based on another value in the same row,

Attached is the sample data and i want to achieve that in case of row value (Leave Approval:Not Required) in any cell then should change the value of cell against Leave Approval from No to be NA

 

Thanks in advance

7 REPLIES 7
paulfound
11 - Bolide

Hi @Mostafa_Anwar,

 

Not sure I understand your data set well enough, but to change a value using another value in the same row, you could use a formula tool and an IF statement, something like this:

PaulFound_0-1573461966444.png

 

Good Luck

Mostafa_Anwar
8 - Asteroid

Thanks @paulfound  for your respond,

Unfortunately value of No is not fixed in specific column,

In my real data it is not limited to specific column, So my question here how i can create condition based on (in case of Leave approval:Not Required) And Row Value beside (Leave Approval) is No then NA Else [Row Value] endif

 

Hope that clarifies 

 

OllieClarke
15 - Aurora
15 - Aurora

Hi @Mostafa_Anwar 

If I've understood you then I think this workflow works:

OllieClarke_0-1573466776583.png

 

OllieClarke_1-1573466833603.png

Hope that helps,

 

Ollie

Mostafa_Anwar
8 - Asteroid

Thanks @OllieClarke  for your respond, Just i want to know what is the formula if didn't mention specific field because might be in Field 2 or Field 3 or others.

 

Really much appreciated.

OllieClarke
15 - Aurora
15 - Aurora

hmmm, maybe I didn't fully understand your data. is this right:
Any field could have "Leave Approval:Not Required" in it, or not. If it does, you want to change the "No"s in that row to "NA", but only if they're next to a cell that says "Leave Approval"?

 

OllieClarke
15 - Aurora
15 - Aurora

@Mostafa_Anwar If that understanding is right, then this workflow should get you where you want to be:

OllieClarke_0-1573473039753.png

OllieClarke_1-1573473110513.png

I've attached the workflow too. Let me know if that helps,

 

Ollie

danilang
19 - Altair
19 - Altair

Hi @Mostafa_Anwar 

 

This was a good one to start off the morning

 

w.png

 

The topmost path transposes the approval types to find if they're required or not.  The second path handles the attachments and transforms them so that each attachment and it's corresponding Y/N value are on one row.  This is joined to the top stream to and then Y/N are changed to NA based on the Required/Not Required from the top stream.  The rest of the workflow is used to get all the columns back into the proper order.  The bottom transpose assigns a column order to all the non-key columns.  The final join and subsequent union get the column order for all the fields calculated from the top streams.  A final crosstab and dynamic rename and you have 

 

r.png 

This solution isn't completely dynamic. The leave types and attachments can appear in a order but the work flow is limited to 3 sets of approvals and their corresponding approvals with the column names listed above, since these are used in the Approval Types and Approval Attachments transpose tools.  If you need this to be completely dynamic let us know and we'll see what we can do.

 

Edit: similar to @OllieClarke's second post

 

Dan  

Labels