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.
Solved! Go to Solution.
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."
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
Alternatively just put this code in the Text property without SET
Min(Filter(Table1,Names = "Jack"),Items)
Suggest you make another post since I might not be able to answer promptly.
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."
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
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."
Alternatively just put this code in the Text property without SET
Min(Filter(Table1,Names = "Jack"),Items)
I put it in a Lable > text
Thanks your the best 😄
can i ask another question here or do i need to make another post?
Suggest you make another post since I might not be able to answer promptly.
I made a new post but no one has seen it.
https://powerusers.microsoft.com/t5/Building-Power-Apps/Multi-layered-sub-ID-s/m-p/584634#M182933
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
272 | |
252 | |
87 | |
37 | |
34 |
User | Count |
---|---|
346 | |
263 | |
131 | |
68 | |
45 |