web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / in textinput Filter wh...
Power Apps
Answered

in textinput Filter which brand's maximum has total value in the same ID

(0) ShareShare
ReportReport
Posted on by 117

Hello All,

In the data below, there is the LineItems Sharepoint list. I can display all fields in a form, by placing a "Textinput" in an external field.
I want to calculate the Maximum total price value by BRAND. But I write down  the text input  which brand has  the maximum  value  

the SharePoint list  here 

sinanaalmac111_0-1690328220507.png


Here are my  example Result for ID=32 

Brand "Corn" Total's = 67,86 AND Brand "Mar" Total = 59,82 in the same ID.TextIput1 or Label1 value  must be shown as 'CORN'

I tried this one but I couldn't find any solution

Sum(Filter(LineItems,ReportID.Id in OpenReports.ID & openRepots.Brand=MAX))

Please help me and Thank you

Regards Sinan

Categories:
  • Verified answer
    v-mingkz-msft Profile Picture
    Microsoft Employee on at

    Hi @sinanaalmac111,

    Do you want to display the Brand whose Total is greatest at the same ID?

    You can use group by and add column function to create a collection.

    Set the onselect property of button:

    ClearCollect(collection,AddColumns(GroupBy(Filter('0726',Title = 32),"brand","TotalItems"),"Sum",Sum(TotalItems,Total)))

    vmingkzmsft_0-1690355912611.png

    Set the text property of TextLabel as:

    First(SortByColumns(collection,"Sum",SortOrder.Descending)).brand

    vmingkzmsft_1-1690355965784.png

     

    Best Regards,
    Kyrie

     

     

  • sinanaalmac111 Profile Picture
    117 on at

    Hi there @v-mingkz-msft  .Thank you. I applied your solution   it is working on one of pages and its SharePoint list 
    But on the other page, I get This warning  and it does not update the collection 

    sinanaalmac111_1-1690368036466.png

     

     

    It only shows warning - this predicate is a literal warning and not reference the input table.

    sinanaalmac111_0-1690367857262.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard