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 filter a text l...
Power Apps
Answered

How to filter a text label similar to how a gallery is filtered

(0) ShareShare
ReportReport
Posted on by 101

Hello,

So I am already pretty far down the line with this app. One of the functions I have set up is to only display the items created by the user logged in. So basically, I have a hidden text label that is set to User().FullName using Office365 connections. From there, I connect this to our employee database to pull job titles, departments, etc. Anyways, filtering my gallery is relatively easy. I have a few extra components that include filters and variables so please ignore those, what I am referrring to is in red.

Filter('Expense Records', SubmittedBy = EmployeeID.Text, Or(varFilter ="All", Status = varFilter))

Basically says that when a form is submitted ^, see if the hidden label on the main page matches the submitted code saved by the form and then display only these values. Simple right?

Well, at the top of my page I want a summary, that lets a user view the counts and totals of their expenses. Here is the function for the Pending one, the only differences are the statuses in "" for the others.

"$ " & Round(If(Sum(Filter('Expense Records', Status = "Pending"), Amount) = Blank(), Blank(), "$ " & Sum(Filter('Expense Records', Status = "Pending"), Amount)), 2)

What I am having trouble with is incorporating the Filter(Source, ID = ID.text) type logic into this already long formula. Right now, these totals sum EVERYONEs expense, but I just want it to pull in the amounts from the user currently logged in, similar to my gallery.

Thanks!

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    154,445 Most Valuable Professional on at

    Hi @water-guy-5 ,

    Maybe something like this

    With(
     {
     wItem:
     Filter(
     'Expense Records', 
     Status = "Pending" &&
     SubmittedBy = EmployeeID.Text
     )
     },
     Coalesce(
     wItem,
     "$" & 
     Round(
     Sum(
     wItem,
     Amount
     ),
     2
     )
     )
    ) 

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Verified answer
    water-guy-5 Profile Picture
    101 on at

    Hey everyone, I figured it out. Turns out it was a lot easier than expected. I was trying to incorporate an AND function to my IF, but I instead just added "&&" with another parameter

    "$ " & Round(If(Sum(Filter('Expense Records', Status = "Pending"), Amount) = Blank(), Blank(), "$ " & Sum(Filter('Expense Records', Status = "Pending"), Amount)), 2)

    with the change is

    "$ " & Round(If(Sum(Filter('Expense Records', Status = "Pending" && SubmittedBy = EmployeeID.Text), Amount) = Blank(), Blank(), "$ " & Sum(Filter('Expense Records', Status = "Pending" && SubmittedBy = EmployeeID.Text), Amount)), 2)

  • WarrenBelz Profile Picture
    154,445 Most Valuable Professional on at

    HI @water-guy-5 ,

    If you have a look at what I posted, it is exactly the same, but you do not have to type in the filter twice.

  • water-guy-5 Profile Picture
    101 on at

    @WarrenBelz whoops sorry about that. I was getting confused by the wItem part of the message you sent

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
wolenberg_ Profile Picture

wolenberg_ 119 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 107 Most Valuable Professional

#3
Haque Profile Picture

Haque 103

Last 30 days Overall leaderboard