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

Identify highest value in 1 column then replace it with specific value from other column

Devina_EDAMcheese
6 - Meteoroid

Hi all,

 

Hope you all doing well 🙂

 

I need your help guys...

 

I have a table with thousand rows. Several values in column Debits 2 and Credits 2 are not correct (you can refer to the highlighted cells).

 

Below is a screenshot of the table:

 

EDAMcheese_2-1573026455661.png

 

How can I change the value in Debits 2/Credits 2 into the right value?

 

I also attached a sampling of the data as a reference.

 

Thanks in advance and warm regards,

 

Devina

4 REPLIES 4
dhtay
8 - Asteroid

@Devina_EDAMcheese 

 

Here's my solution.

For exception handling, you can Filter out the case just to change the value for one row, and then Union it back with the rest of the data. To ensure everything is in the same order as before, use the RecordID tool at the start so that you have a field to sort your data on after using Union.

Devina_EDAMcheese
6 - Meteoroid

Thank you for the solution, it works for a small data size but if I have a large data (for example thousands rows or more), I don't think it will be very efficient to filter it one by one..is there any other way to change it without filtering it one by one?

danilang
19 - Altair
19 - Altair

Hi @Devina_EDAMcheese 

 

How do you determine which values need to be changed?  In your title you refer to the highest(largest?) value, but 20 is not the largest(nor the highest) value in the Credits 2 column.  Once you have this defined, how do you pick which values to use as a replacement?   

 

Is this based on a series of rules about the type of row(Credit/debit), some match between Account no 1 and Account no 2?  Please be as detailed as possible

 

Dan

Devina_EDAMcheese
6 - Meteoroid
Hi Dan,

Thanks for your input. The highest meaning highest amount in debit 2 / credit 2 per its reff column. For example in reff 59-2, the highest amount between debit 2/credit 2 is 100 and in reff 47-4 the highest amount is 20. Those highest amount should be replaced with the correct amount referring to the Account name 1 column. For example Loan in reff 59-2 batch only amounting to 90 at the debit 1 (left side debit credit) thus loan at the credit 2 (right side debit credit) should be 90 too not 100. Another example is the Loan interest expense in reff 59-2 batch only amounting to 2 at the debit 1 thus Loan interest expense at the credit 2 should be 3 too not 100.
Labels