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 formula slow
Power Apps
Answered

CountRows formula slow

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all, 

 

I'm relatively new to PowerApps, and I'm wondering how I can reproduce the ticket counter on the "Service Desk" default app.

 

I've connected my app to Salesforce, and I'm pulling back the Cases Table...

 

Here's what I'm trying to do, a count of each job with a field matching a criterion:

 

Capture.PNG

 

Here's the code I'm using to get the  urgent priority count:

 

CountRows(Filter(Cases, OwnerId = "00Ga0000004T8gQ", IsClosed = false, Priority = "Urgent")) + CountRows(Filter(Cases, OwnerId = "00Ga0000004T8gV", IsClosed = false, Priority = "Urgent"))

I'm counting the rows in the First Line that get returned by the filter, and then adding it to the number of rows returned by the filter for the Second Line.

 

When I start the app there's a noticable delay before it loads, external service latency aside, is there any more efficient way I can get a count with the above code?

Categories:
I have the same question (0)
  • Verified answer
    murali Profile Picture
    Microsoft Employee on at

    You could simply do

     

    CountRows(Filter(Cases, OwnerId = "00Ga0000004T8gQ" || OwnerId = "00Ga0000004T8gV", IsClosed = false, Priority = "Urgent"))

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks @murali!

     

    I tried using the Or() operator, but that makes more sense! It's like C# all over again. Smiley Very Happy

     

     

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 387

#2
timl Profile Picture

timl 340 Super User 2026 Season 1

#3
Vish WR Profile Picture

Vish WR 301

Last 30 days Overall leaderboard