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 / Simple Count in Power ...
Power Apps
Unanswered

Simple Count in Power Automate and Sharepoint

(0) ShareShare
ReportReport
Posted on by 3

I have a Sharepoint list that gets updated throughout the day by users on a PowerApp. In it, I have data coming in about residents from three facilities. Residents come and go all the time, so I have created one single line of text column for "Facility" names and another boolean column for "Current". 

 

I would like to run a report daily count on how many rows in the Sharepoint list of current residents in each facility, and put it in a separate list called "Daily Count".

 

I've figured out that in ODATA, `(Current eq true) and (Facility eq 'Facility 1')` should filter out all the non-current residents of a given facility. I just want to take that filtered data, count the number of items/rows, and put that into the new list. 


When I try the `length(outputs('Get_items')?['body'])` of the body of the list, it tells me that it's an Object and I can't take length() of an object. When I do `length(createArray(outputs('Get_items')?['body']))`, it returns a single result. 

 

I don't want to be running some sort of recursive loop to go through all 500+ residents one by one, because it seems wasteful and takes a long time.


What am I missing?

 

Thank you.

Categories:
  • Abhilash_Swain Profile Picture
    901 on at

    Hi @ezrabutler,
    If I understood your requirement correctly,  you want to show something similar to the below screenshot.

    Filter out data with "(Current eq true) " and then use the below logic to show.
    SP List contains - Emp ID and Reporting Manager  and My power Apps shows count for each Manger 

    Abhilash_Swain_0-1641193820200.png

    Abhilash_Swain_1-1641193842500.png

     

    For this, I use GroupBy in "Items" of the gallery. (Employee_office  is my source, "Manager"- Existing column in source, "total_Count"- is the group by column name.)

    Please Note:- total_Count here represents a table stored under the column.

    Abhilash_Swain_2-1641194025953.png

    To display the count:-  Select Subtitle- Go to text and use the count formula to display no of rows in the group by.

    Abhilash_Swain_3-1641194188537.png

     

     

     

    Hope this will help you. 
    Give a like or accept as a solution or share your concerns if this is not helping.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @ezrabutler 

    Try using this instead:

     

    length(body('Get_items')?['value'])

     See here for more info

    https://tahoeninjas.blog/2019/07/04/how-to-count-number-of-items-returned-by-sharepoint-getitems-action-in-flow/

     

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard