Start Free Trial

Alteryx Designer Desktop Discussions

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

Exclude specific rows

anujarora1
5 - Atom

Hi Experts,

 

I have a scenario where I want to exclude certain rows from the data only to perform additional procedures and achieve an outcome based on the included rows. Later in my output I want to keep all the rows and assign a final value (in a new column) to all rows, even the excluded ones.

 

In the below table, I want to exclude any Fee or Tax Amount and include only Value (names may vary, can have multiple options). Then I compare all amounts within the Value Type (which is same in each case). Therefore, the final outcome in the column Output is "Fixed Amount" but now I want to put this in all columns (even the excluded Fee and Tax).

 

Thanks a lot!

 

IDTypeAmountOutput (New Column)
1Value500Fixed Amount
1Value500Fixed Amount
1Value500Fixed Amount
1Value500Fixed Amount
1Value500Fixed Amount
1Value500Fixed Amount
1Value500Fixed Amount
1Value500Fixed Amount
1Value500Fixed Amount
1Value500Fixed Amount
1Fee10Fixed Amount
1Tax5Fixed Amount
1 REPLY 1
danilang
19 - Altair
19 - Altair

Hi @anujarora1 

 

Here's one way to do it

 

danilang_0-1630860217992.png

 

After assigning a RecordID to use in the final sort, exclude all the Fee and Tax records.  Count number of distinct amounts grouped by ID.  If this is 1 then it's a Fixed amount.  If not, it's Variable.  Join this result back to your original data.  This assigns the Fixed/variable output to all the rows with the matching ID to give you 

danilang_1-1630860463949.png

 

Dan

Labels
Top Solution Authors