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 / Count rows where XX nu...
Power Apps
Answered

Count rows where XX number of columns are true

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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,836 Super User 2026 Season 1 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,843 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
    Microsoft Employee 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard