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 / CountRows with Filter ...
Power Apps
Unanswered

CountRows with Filter on multiple columns

(0) ShareShare
ReportReport
Posted on by 85

Hello,

 

I'm trying to combine multiple conditions to the CountRows:

 

CountRows(Filter('Source'; Column1 = Concat(varSelected; Nadpis) && 'Column2' = startTime))

 

 

I need to get back number of rows that fulfill the two(three, four) conditions. If I do one condition at a time, it works fine but it doesn't work when I start adding criteria.

 

What is the proper syntax?

 

Thank you

Categories:
I have the same question (0)
  • charlessexton Profile Picture
    11 Super User 2024 Season 1 on at

    You don't need to have apostrophes on your column name unless there are spaces in it. So 'Column2' should be Column2.

  • JanDras Profile Picture
    85 on at

    Yes, I renamed it just for the sake of the post, in the original the column names do have spaces.

  • charlessexton Profile Picture
    11 Super User 2024 Season 1 on at

    When you say that it doesn't work, in what way doesn't it work? CountRows gives you an error? CountRows states there are zero items?

  • JanDras Profile Picture
    85 on at

     

    Source:

    Column1Column2Column3
    Name1StartTime1EndTime1
    Name2StartTime2EndTime2

     

    I am trying to create an if() condition that would prevent the users creating a duplicate entry.

     

    If I use:

    CountRows(Filter(Source; Column1 = Name1))

    The output is 1 (and it's right.

    but once I use:

     

    CountRows(Filter(Source; Column1 = Name1 && Column2 = startTime1))

     

    The output is 0 but the row that matches the conditions exist.

  • charlessexton Profile Picture
    11 Super User 2024 Season 1 on at

    Have you looked at the output from Column2 and startTime1 to make sure they're the same as each other? They will need to be the same type and format in order to match. They have to be exactly the same.

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
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard