Skip to main content
Nintex Community Menu Bar

How to use lookup function to find the MAX number in a column

  • September 27, 2021
  • 1 reply
  • 371 views
  • Translate

I have a form that calculates total sales

EmployeeName | TotalSales

 

I want to display the top seller(EmployeeName) and total (TotalSales) on form load when a new entry is made

 

Did this topic help you find an answer to your question?

1 reply

Forum|alt.badge.img+8
  • Novice
  • 177 replies
  • September 30, 2021

You can do a lookup returning multiple values by providing true at the end of the formula. So given that each employee only occurs once in your list, you could get the max-total-sales  this way using two lookups:

lookup("your-list","totalSales",max(lookup("your-list","active",true,"totalSales",true)),"Person")

This will give you the person with the highest "totalSales" value in "your-list". I had to work in a filter for the inner lookup to look at only "active" elements as you can´t do lookups without a filter. 

Outter lookup is responsible to get a person filtered by totalSales

Inner lookup gets the highest totalSales number.

 

Hope this helps!

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings