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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Count rows where XX nu...
Power Apps
Unanswered

Count rows where XX number of columns are true

(0) ShareShare
ReportReport
Posted on by

Hi all,

I'm struggling with this request.

 

I have a SP table with customers in rows.

I than have 4 columns with items that are true/false.

 

I want to have a count like this:

Total Customers with 0 true in columns = 

Total Customers with 1 true in columns = 

Total Customers with 2 true in columns = 

Total Customers with 3 true in columns = 

Total Customers with 4 true in columns = 

 

Thank you!

Categories:
I have the same question (0)
  • Jon Unzueta Profile Picture
    1,827 Super User 2025 Season 2 on at

    @Anonymous 

     

    Try this

    for the first case 

    CountRows(Filter("yourdatasource","yourfirstfield".no,"yoursecondtfield".no,"yourthirdfield".no,"yourfourthfield".no),"yourfivetfield".no))

     

    for the rest cases you must change .no to yes in the cases and put with OR to cover all the cases

  • Verified answer
    rubin_boer Profile Picture
    4,841 Super User 2024 Season 1 on at

    hi @Anonymous 

     

    You can also try adding a column to your datasource as the sum of the columns and count them with countif.

     

    Consider:

    Collect(colUpated, AddColumns(yourSpList, "total", Sum(col1, col2, col3, col4)))

     

    displaying the values will be like this in a label:

    "Total Customers with 0 true in columns = " & CountIf(colUpated, total = 0)

     

     

    Result

    rubin_boer_0-1685104231260.png

     

  • Community Power Platform Member Profile Picture
    on at

    Thanks @Jon_Unzueta but the solution of @rubin_boer was what I was already trying and it works like a charm!

    Best

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard