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 / How to write 2 formula...
Power Apps
Answered

How to write 2 formulas in a gallery

(0) ShareShare
ReportReport
Posted on by 5

So i want to write 2 formulas in my gallery,one to sort it after a variable ,and another to filter it from a text input .The formulas work by themselves,but when i want to combine them they dont work.How can i combine them so they work?
-Filter(FlooringEstimates,StartsWith(Name,cauta.Text))
 -If(!IsBlank(pret), SortByColumns(FlooringEstimates,"Price",If(pret=true ,Ascending ,Descending)),FlooringEstimates)

Categories:
  • Verified answer
    Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    To do what you want you should nest the formulas.  Simply replace FlooringEstimates in the second formula with the whole Filter() formula like this.

    If(!IsBlank(pret), SortByColumns(Filter(FlooringEstimates,StartsWith(Name,cauta.Text)),"Price",If(pret=true ,Ascending ,Descending)),Filter(FlooringEstimates,StartsWith(Name,cauta.Text)))

     

  • TheRice Profile Picture
    5 on at

    Thank you 🤡 it worked 

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 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard