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 / 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
    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
    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
    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

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