Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Selecting data based on condition

SCK
8 - Asteroid

Hi all. I need help in selecting data based on a condition. The condition being that I should not select more than two of the same customer. Below is the input. Please help.

 

Input:

 

NameAmount
A100
B40
C50
D20
E60
F80
G100
H90
A85
A80
A100
D40
D50
D20
H60
H80
I100
M90
R85
E80
C87
D79
C86
P50
H45
H30
E20
F100
R150
E66
A190
A250
A300
A79
A86
F50
F45
F30
G20
H100
H150
A65
A99
A87

 

In the above example - I can choose A but only twice and the amount can be anything for example - A 65 and A 100 or A 99 and A 87.

 

Thanks

10 REPLIES 10
PhilipMannering
16 - Nebula
16 - Nebula

Here you could just use the Sample Tool. Pick N=2 (for any selection method) and Group by the column [Name]

PhilipMannering_0-1606728347844.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @SCK 

 

You can use a sample tool like this

atcodedog05_0-1606728329512.png

Set it to Pick First 2 rows groupby Name.


Hope this helps 🙂 Feel to ask if you have any questions


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

 

 

 

Emil_Kos
17 - Castor
17 - Castor

Hi,

 

I believe the easiest way to achieve this is using the sample tool.

It gives you possibility to group by certain column. In this particular case you need to group by name and pick first 2 rows. 

 

Emil_Kos_0-1606728332059.png

 

 

Good Luck!

 

Qiu
20 - Arcturus
20 - Arcturus

@SCK 
Sample tools is for this.

1130-SCK.PNG

atcodedog05
22 - Nova
22 - Nova

Guess we all thought alike and posted in seconds interval 😅

Qiu
20 - Arcturus
20 - Arcturus

@Emil_Kos  @atcodedog05  @PhilipMannering 

You guys are unbelievable.😁

SCK
8 - Asteroid

All worked perfectly fine. I did not think of the group by method earlier. Thanks for your help. 🙂

atcodedog05
22 - Nova
22 - Nova

Hi @SCK 

 

Since we all responded at the time with alike solution i would request if you can mark all our posts solution😅

 

Then again its totally upto you🙂

 

Happy to help 🙂

 

Cheers and Happy Analyzing 😀

 

Feel free to reach out if you face any issues 🙂

atcodedog05
22 - Nova
22 - Nova

Thank you for your generosity 🙂 @SCK 

 

Happy to help 🙂

 

Cheers and Happy Analyzing 😀

 

Feel free to reach out if you face any issues 🙂

Labels