Alteryx Designer Desktop Discussions

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

Display all rows if a row contains negative amount

Muhammad
7 - Meteor

Hi,

 

Below is my sample data set. If any of the rows of a Product ID contain a negative (-) Amount, I want to see all the rows of that Product ID (only). Any help would be highly appreciated. Thanks.

 

Input Data:

Product IDProduct NameAmount
1001001Laptop-3000
1001001Laptop3000
1001001Laptop4800
1001002Keyboard1230
1001002Keyboard1500
1001003Mouse-27800
1001003Mouse7000
1001003Mouse27800
1001003Mouse80
1001003Mouse1100
1001004TV-100
1001004TV1000
1001005PC200
1001005PC250
1001006Tablet200
1001006Tablet150
1001007Smart Phone500
1001007Smart Phone-450

 

Desired Output:

Product IDProduct NameAmount
1001001Laptop-3000
1001001Laptop3000
1001001Laptop4800
1001003Mouse-27800
1001003Mouse7000
1001003Mouse27800
1001003Mouse80
1001003Mouse1100
1001004TV-100
1001004TV1000
1001007Smart Phone500
1001007Smart Phone-450
2 REPLIES 2
CharlieS
17 - Castor
17 - Castor

I would approach this by using a Filter, Summarize, and Join tool. 

 

- Filter records that contain a negative value

- Summarize the Product Names from that list

- Join that list of Product Names to the original and the Joined result will be your requested output.

*The Join tool will sort the data based on the joining field(s), so a sort tool might be useful to return the original Product ID order.

 

Check out the attached workflow to see this in action.

 

 

JosephSerpis
17 - Castor
17 - Castor

Hi @Muhammad I mocked up an example on how you could do this. Multi_Row080819.JPG

Labels