Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Multi row formula

Istwineres
8 - Asteroid

Hi, I have this situation:

A | B | C | D

----------------

x | y |  z | w

x | a | z | w

 

4 fields with multiple records but I'd like to handle this situation if 2 records or more have same values in same fields except one (in this example the B field) then filter out these records. The unique tool doesn't seem to have an utility here

 

 

10 REPLIES 10
rkapoor
Alteryx
Alteryx

@Istwineres within the Multi-row formula you can Group By fields.  Will this do the trick for you?

This link has a good example for you:

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/How-to-use-group-by-in-Multi-row-formu...

afv2688
16 - Nebula
16 - Nebula

Hello @Istwineres ,

 

I came up with a solution but don't know if this is what you are looking for.

 

Regards

Istwineres
8 - Asteroid

I'm looking at the example you shared, in my case I should group by field A, C and D but I still miss the expression

Istwineres
8 - Asteroid

I'd like to remove or filter out these kind of records

afv2688
16 - Nebula
16 - Nebula

Hello @Istwineres,

 

In my example what I am doing is group by the columns and comparing the values on the results. If there are different values on the column it will post a 1 on the second one, if not, a 0 will be added. At last, what I do is filter out those who had a difference

 

Regards

Istwineres
8 - Asteroid

Yes, I understand but I've got a slightly different problem: if on multiple records 3 fields have same values remove/filter them:

 

F1 | F2 | F3 | F4

---------------------

x   |  y  |   z   |  w

x   |  a  |   z   |  w

 

In my example I'd like to have none of them in final output. Many thanks!

pedrodrfaria
13 - Pulsar

Hi @Istwineres 

 

Is this what you are looking for?

 

I wasnt sure if you were trying to remove the fields that do not match or keep them.

 

Data Input:

pedrodrfaria_0-1615378984051.png

 

Output eliminating what matches:

 

pedrodrfaria_1-1615379006831.png

Keeping what matches:

pedrodrfaria_3-1615379079819.png

 

 

pedrodrfaria_4-1615379086518.png

 

 

 

Istwineres
8 - Asteroid

just remove/filter the entire row if three fields have same value, so in this case the output should contains no rows

pedrodrfaria
13 - Pulsar

@Istwineres 

 

I attached an updated version.

 

Is this what you are looking for?

 

I check to see if 3 or more fields have duplicate values, if they do, then filter those rows out.

 

pedrodrfaria_0-1615381304394.png

 

 

 

Labels
Top Solution Authors