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

Sampling Tool Query

DHB
8 - Asteroid

I'm using the sampling tool to take the first 10 records after I've sorted them by value in descending order.  This works well enough but I notice that the 11th record is the same value as the 10th record and so I'd like to keep it.  Is there a way I can get the top 10 and any others that have the same value as the 10th?

 

Thanks in advance,

 

DHB.

2 REPLIES 2
derekbelyea
12 - Quasar

 

Here is an example that may help you.

 

This workflow evaluates the incidence of the 10 highest temperatures from a weather data set for California.

2018-02-06_00013.png

 

Note that this results in 17 records for the top 10 temperatures:

 

              results.png 

DHB
8 - Asteroid

Thank  you for your solution.  I came up with something as well but it isn't as elegant as yours.  I kept the sampling tool and did this...

 

1.JPG 

I'm joining on the value

 

The first Summarize tool summarises the top 10 records that don't have an equivalent value in the other records,

The second Summarize tool summarises the top 10 records that do have an equivalent value in the other records, (Left records),

The third Summarize tool summarises the other records that have an equivalent value in the top 10 records (Right records).

 

Thanks for your help.

Labels