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 / Total created and tota...
Power Apps
Answered

Total created and total completed based on branch dropdown

(0) ShareShare
ReportReport
Posted on by

Hello,

 

I have a couple labels that I want to show the total SharePoint list count based on the Gallery being filtered by the Branch dropdown. Branch is of course the Office Location.

 

So basically I have a button that when pressed shows stats (In a label) for the current branch chosen from the dropdown.

 

Total items created (not sure about the rest)

If(BranchStatsButton2,CountRows(Filter(AllBranches,BranchDropdown.Selected.Value,

 

Total Completed (Status field) based on chosen branch. (Not producing required results)

If(
 BranchStatsButton2,
 CountRows(
 Filter(
 AllBranches,BranchDropdown.Selected.Value,
 Status.Value = "Completed"
 )

 

Any help would be much appreciated.

 

Thanks in advance.

Categories:
  • WarrenBelz Profile Picture
    156,526 Most Valuable Professional on at

    @ShadowTech ,

    I assume this is the complete current problem you have posted.

    If you want all records created

    If(
     BranchStatsButton2,
     CountRows(AllBranches)
    )

    Assuming the name of the field in AllBranches is Branch and it is a Choice column

    If(
     BranchStatsButton2,
     CountRows(
     Filter(
     AllBranches,
     Branch.Value = BranchDropdown.Selected.Value &&
     Status.Value = "Completed"
     )
     )
    )
    

     

    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.

     

  • ShadowTech Profile Picture
    on at

    @WarrenBelz Right. Basically I need both labels to show counts for total of the SharePoint list (gallery) if Branch drowpdown is "All" or by the branch choice.

     

    So I changed total items to this which counts all records per branch dropdown choice. 

    If(
     BranchStatsButton2,
     CountRows(
     Filter(
     AllBranches,
     Branch.Value = BranchDropdown.Selected.Value
     )
     )
    )

     

    but for some reason when the dropdown choice is "All", I get a zero.

     

    Thoughts?

  • WarrenBelz Profile Picture
    156,526 Most Valuable Professional on at

    @ShadowTech ,

    You might go back to some previous code I did for you and see if you can see the concept

    If(
     BranchStatsButton2,
     CountRows(
     Filter(
     AllBranches,
     BranchDropdown.Selected.Value = "All" ||
     Branch.Value = BranchDropdown.Selected.Value
     )
     )
    )

     

    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.

  • ShadowTech Profile Picture
    on at

    @WarrenBelz Awesome, that did it. So to finish off my question, what would be the best way to apply to the status label?

     

    If(
     BranchStatsButton2,
     CountRows(
     Filter(
     AllBranches,Branch.Value = BranchDropdown.Selected.Value &&
     Status.Value = "Unopened")
     )
    )

     

    Thanks again for the help.

  • Verified answer
    WarrenBelz Profile Picture
    156,526 Most Valuable Professional on at

    @ShadowTech ,

    You just need to apply the correct and/or bracketing

    If(
     BranchStatsButton2,
     CountRows(
     Filter(
     AllBranches,
     (
     BranchDropdown.Selected.Value = "All" ||
     Branch.Value = BranchDropdown.Selected.Value
     ) &&
     Status.Value = "Unopened"
     )
     )
    )

    I assumed you might be able to put the two bits together.

     

    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.

  • ShadowTech Profile Picture
    on at

    @WarrenBelz  Thank you sir.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard