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
User | Count |
---|---|
251 | |
250 | |
82 | |
45 | |
29 |
User | Count |
---|---|
344 | |
262 | |
122 | |
64 | |
58 |