Alert: There is a planned Community maintenance outage October 16th from approximately 10 - 11 PM PST. During this time the Alteryx Community will be inaccessible. Thank you for your understanding!

Alteryx Designer Desktop Discussions

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

Finding the max of one field by two variables

ryanliefer
6 - Meteoroid

Hello,

 

I am looking to find the max value of one field by two variables and am having trouble returning this while keeping all of the fields I need. I attached a screen grab of the file I am manipulating and some empty columns of the desired outcome.

 

I am looking to find the Max "cases" by "zip code" while including which hospital the max cases belongs to.

 

Any ideas on the formula? I am guessing it's a max if in the formula tool but haven't been able to crack it.

 

Thanks for the help!

4 REPLIES 4
Ladarthure
14 - Magnetar
14 - Magnetar

Hello,

 

I don't think you will find your answer in formula itself, it might be a combination of sorts and sample or summarize and join (see attached wf).

TylerNa
10 - Fireball

I would utilize the summarize tool and then group by zip code and hospital and then utilize the max function in the tool for cases. You can then add a sort tool to get the number of cases in a descending order.

ryanliefer
6 - Meteoroid

This is perfect... hardly utilize the Sample tool but It is exactly what I needed.

 

Thanks!

Ladarthure
14 - Magnetar
14 - Magnetar

You're welcome :)

Labels