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.

Adding a column called min and assigning its value finding the min by group

robertporternz
8 - Asteroid

Hi there, new user and just getting to grips with everything, just wondering what best practice would be for adding a new column to an input dataset which needs to go through the records by group (market_id) and looks up the min value in (sales) for each of those groups

 

I have seen examples using Summarize and then join back on but I was wondering if there is any other way, like using the formula feature  that you could recommend I research into ?

 

Cheers in advance,

Rob

 

 

 

 

6 REPLIES 6
atcodedog05
22 - Nova
22 - Nova

Hi @robertporternz 

 

Here is how you can do it.

Workflow:

atcodedog05_0-1644835933827.png

 

Hope this helps : )

 

robertporternz
8 - Asteroid

Awesome cheers for that, super quick reply much appreciated, so that looks like its using the join method which is going to be super handy.

 

Also  still just wondering if there any other ways that it can be done (or more specifically features that are in designer that I should look up,  i potentially am going to have a few different calculations  like this and wondering will they each need their own Summarize and Join or if I can do them all in a  simple step somehow 

 

Im wondering  random things like if I could say use a SQL query somehow etc and then have a series of them in a step etc

 

 

binuacs
21 - Polaris
atcodedog05
22 - Nova
22 - Nova

Hi @robertporternz 

 

The chances of you getting a sql based solution here is low.

robertporternz
8 - Asteroid

Cheers, I can build the sql statement ,I'm just not sure if there is a tool that I should be using it in, "Formula" sounded likely but no from what I've read so far. 

robertporternz
8 - Asteroid

Awesome , thanks for this example, really handy,  so its a sort ascending and then select first record , really cool example and then adding it into the join 

Labels
Top Solution Authors