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 / Need to Count Total nu...
Power Apps
Answered

Need to Count Total number of entries in Table for a Particular person

(0) ShareShare
ReportReport
Posted on by 6,048 Super User 2024 Season 1

24.png

Above is my app.

Candidate gallery has "Candidate data source"

Submission gallery has "Submission data source"

As you can see there are two side by side galleries with 2 different data sources. One gallery is for candidate details and another gallery for how many submissions are done for that particular candidate and also according to filters applied on that gallery.

 

My requirement is:

In Candidate gallery i need a label that shows all the submission in "Submission data source"  for that particular user regardless of filters.

Thanks in advance.

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @zmansuri 

    What does your Items property of the Candidate gallery look like?

    That is where this can be added in.

  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    Item Property of candidate gallery:

     

    If(
    !IsBlank(SearchBox.Text),
    Search(
    Filter(
    ITPathFinderCandidate,
    Status.Value = drpStatus.Selected.Value || drpStatus.Selected.Value = "All",
    Technology.Value=drpTechnology.Selected.Value||drpTechnology.Selected.Value="All"
    ),
    SearchBox.Text,
    "FirstName",
    "LastName"
    ),
    Filter(
    ITPathFinderCandidate,
    Technology.Value=drpTechnology.Selected.Value||drpTechnology.Selected.Value="All",
    Status.Value = drpStatus.Selected.Value || drpStatus.Selected.Value = "All"
    )
    )
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @zmansuri 

    Very good!

    The formula can be changed to this:

    Search(
     Filter(ITPathFinderCandidate,
     (Status.Value = drpStatus.Selected.Value || drpStatus.Selected.Value = "All") &&
     (Technology.Value=drpTechnology.Selected.Value || drpTechnology.Selected.Value="All")
     ), 
     SearchBox.Text, "FirstName", "LastName"
    )

    There is no need to check if the textinput is blank and then add the same redundant formula.

     

    Now, you have one of two choices...

    1) Add the count in the Gallery

    AddColumn(
     Search(
     Filter(ITPathFinderCandidate,
     (Status.Value = drpStatus.Selected.Value || drpStatus.Selected.Value = "All") &&
     (Technology.Value=drpTechnology.Selected.Value || drpTechnology.Selected.Value="All")
     ), 
     SearchBox.Text, "FirstName", "LastName"
     ),
     "SubmitCount", CountRows(SubmissionDataSource, userMatchingCriteria)
    )

    Then you can have a label in the Gallery with Text property of : ThisItem.SubmitCount

     

    -or-

    2)  Just add a label in the Gallery with : CountRows(SubmissionDataSource, userMatchingCriteria)

     

    Both will work, the first will slow the initial load of the Gallery and the second will display "incorrect" results until it finally evaluates that row.

    So in other words, shifting the slow from the gallery load to the label.  So depends on which works best for you.

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 323

#3
WarrenBelz Profile Picture

WarrenBelz 193 Most Valuable Professional

Last 30 days Overall leaderboard