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 / Using CountRows / Filt...
Power Apps
Answered

Using CountRows / Filter for multiple Values

(0) ShareShare
ReportReport
Posted on by 580

I'm trying to use countrows for multiple values. 

 

I'm using this formula for one value CountRows(Filter('data', Grade.Value="EMT"))

But I want to be able to add additional values to the countrows, I thought It would be && but that does not seem to work. 

 

 

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

    @AdamH 

    If you mean adding additional criteria to your filter, then simply put them in as such:

       CountRows(Filter('data', Grade.Value="EMT" && someColumn=Something && ...etc... ))

     

    I hope this is helpful for you.

  • AdamH Profile Picture
    580 on at

    @RandyHayes 

     

    Yeah I also tried that way, but the SP List Column is a dropdown with values in, so I want to add certain values with in the column together. 

     

    CountRows(Filter('data', Grade.Value="valuea && Grade.Value=valueb"))

     

    That's what I thought it would be, but that's not working. 

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @AdamH 

    Your syntax is wrong...

        CountRows(Filter('data', Grade.Value="valuea" && Grade.Value="valueb"))

     

    However, this will NEVER give you a result.  You are using the AND (&&) operator on the two conditions and the Value of that column can never be both of those values.

     

    If you want to filter on if either of values are found, then use an OR (||) operator instead.

        CountRows(Filter('data', Grade.Value="valuea" || Grade.Value="valueb"))

     

    You can also shortcut a little on text values when doing an OR:

        CountRows(Filter('data', Grade.Value in "valuea|valueb"))

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

#2
WarrenBelz Profile Picture

WarrenBelz 204 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard