cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

Max Name Items

I have an Excel form like this


ID | Names | Items

1 | Jack | 17

2 | Tim | 40

3 | Tim | 56

4 | Jack | 34

5 | Jack | 12

6 | Tim | 97

 

and I want to set Jack's least amount of items to a variable but I can't get the code right.
Set(leastAmountOfItems,min(lookup(Table1,Names = jack)),Items) or something like this.

4 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Max Name Items

@natmaxex 

Like this...

Set(leastAmountOfItems,Min(Filter(Table1,Names = "Jack"),Items))

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Highlighted
Resolver I
Resolver I

Re: Max Name Items

nope didn't work says:

Behavior function in a non-behavior property. You can't use this property to change values elsewhere in the app.

 

Also, will this work if "item" is "price"? example: 12.57

View solution in original post

Highlighted
Super User III
Super User III

Re: Max Name Items

@natmaxex 

 

Alternatively just put this code in the Text property without SET

 

Min(Filter(Table1,Names = "Jack"),Items)

 

View solution in original post

Highlighted
Super User III
Super User III

Re: Max Name Items

@natmaxex 

Suggest you make another post since I might not be able to answer promptly.

View solution in original post

9 REPLIES 9
Highlighted
Super User III
Super User III

Re: Max Name Items

@natmaxex 

Like this...

Set(leastAmountOfItems,Min(Filter(Table1,Names = "Jack"),Items))

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Highlighted
Resolver I
Resolver I

Re: Max Name Items

nope didn't work says:

Behavior function in a non-behavior property. You can't use this property to change values elsewhere in the app.

 

Also, will this work if "item" is "price"? example: 12.57

View solution in original post

Highlighted
Super User III
Super User III

Re: Max Name Items

@natmaxex 

It works.  You are getting an error because you can only put it in the properties OnSelect, OnVisible, OnChange, OnStart.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

Highlighted
Super User III
Super User III

Re: Max Name Items

@natmaxex 

 

Alternatively just put this code in the Text property without SET

 

Min(Filter(Table1,Names = "Jack"),Items)

 

View solution in original post

Highlighted
Resolver I
Resolver I

Re: Max Name Items

I put it in a Lable > text 

Highlighted
Resolver I
Resolver I

Re: Max Name Items

Thanks your the best 😄

Highlighted
Resolver I
Resolver I

Re: Max Name Items

can i ask another question here or do i need to make another post?

Highlighted
Super User III
Super User III

Re: Max Name Items

@natmaxex 

Suggest you make another post since I might not be able to answer promptly.

View solution in original post

Highlighted
Resolver I
Resolver I

Re: Max Name Items

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,393)