
Announcements
I have a powerapps with SharePoint as the backend. Below is my SharePoint list
In my item details page, I have a label named Highest Price where i need to show the highest amount filtered by ID. i.e.
For 1001, the label should show $1000 as this is the highest amount when filtered by ID. I tried using below code, but it doesnt work.
For 1002 item details details page, it should show $2000
Label Text property contains below code
SortByColumns(Filter(DataSource, ID=globvar.ID),Amount,SortOrder.Descending)
Any idea where i am going wrong?
SortByColumns returns a table. If you want to want to display the Amount that corresponds to the first record in the result, the formula would look like this:
First(
SortByColumns(Filter(DataSource, ID=globvar.ID),
Amount,
SortOrder.Descending
)
).Amount