Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Passing Calculated Value as "N Value" in Random Sample Tool

Allan_F
7 - Meteor

I am trying to pass a value into the Sample Tool which dictates the "N Value." 

I have using a Summarize and Formula to provide a total count of employees, and dividing that by 10 to show how many would account for the bottom 10%. I want that value to replace the "N Value" in the Sample Tool so that it is configured to Last N Rows -- therefore pulling the bottom 10% of employees in the sorted table.

Allan_F_0-1643302388008.png

 

5 REPLIES 5
RolandSchubert
16 - Nebula
16 - Nebula

Hi @Allan_F ,

 

if I got you right, you are looking for the configuration of the  Action tool to change the number of rows? You could try this:

 

2022-01-27_18-03-04.jpg

 

Let me know if that works for you.

 

Best,

 

Roland

Allan_F
7 - Meteor

I have the Action Tool set like your screenshot, my issue is connecting the output from the Formula Tool to that Action Tool.

For example the Formula provides "8" I want to pass that "8" into the Action Tool to update the N Value in the Sample Tool to 8.

RolandSchubert
16 - Nebula
16 - Nebula

Hi @Allan_F ,

 

okay, I see. It could be done like this:

 

2022-01-27_18-14-56.jpg

 

I've attached a sample workflow to show how it works.

 

Best,

 

Roland

atcodedog05
22 - Nova
22 - Nova

Hi @Allan_F 

 

Action tool only works in app or macro. Hence you need to place sample tool in a macro like below.

 

atcodedog05_0-1643303759985.png

 

This macro can be used in any workflow like below right-click on the canvas and import the macro.

atcodedog05_2-1643303817501.png

 

 

Learn more on batch macros here: https://community.alteryx.com/t5/Interactive-Lessons/Creating-a-Batch-Macro/ta-p/657923 

 

Hope this helps : )

 

Allan_F
7 - Meteor

Thank you all, got it working!

Labels
Top Solution Authors