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 Automate / Count items in sharpoi...
Power Automate
Unanswered

Count items in sharpoint list

(0) ShareShare
ReportReport
Posted on by 93

Hi everyone

 

I have a list that contains the following columns

 

- Employee Number

- Employee Name

- Department e.g HR, Finance...etc

- Status. e.g not start, pending, complete ...etc

 

I want a flow that count the items like the following example

StatusHRFinanceTotal
not start10212
Pending20323
Complete30434
Total60969

 

with million thanks

 

Categories:
  • Liquid error: Exception has been thrown by the target of an invocation. Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @alhilo 

     

    Please use Get Items and then Apply to each. For counting you need a variable of type int.

     

    Steps-

    1. Get items

    2. Initialize a variable- Int type

    3. Apply to each- supply value from get items

    4. Inside apply to each- Increment variable by 1.

     

    you can manager status column in get items filter query/filter array for each department

     

    Thanks

    Hardesh

  • alhilo Profile Picture
    93 on at

    Thank you for this

     

    Please note that I need also to send these numbers(count) in a table through email. and the table should be in the body of the email 

     

     

  • alhilo Profile Picture
    93 on at

    Hi Everyone

     

    would you please advise regarding my question

     

    with million of thanks

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @alhilo 

     

    Have you tried steps given above? if yes please share screens.

     

    Thanks

    Hardesh

  • alhilo Profile Picture
    93 on at

    Yes, and i can't find the output count when want to chose in the body

     

    https://ibb.co/MN90565


    https://ibb.co/pdZJBbF

     

  • alhilo Profile Picture
    93 on at

    https://ibb.co/sCqPKHM

     

    also, this is an error that i face

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @alhilo 

     

    Please share complete flow screen.

     

    Thanks

    Hardesh

  • alhilo Profile Picture
    93 on at

    Here we go 🙂 

     

    https://ibb.co/mDfp4hy

     

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @alhilo 

     

    After get items use apply to each action in that supply value from get items. Inside apply to each use increment variable.

     

    You have initialized variable of type int but you your value is not typ of int (use zero )

     

    Thanks

    Hardesh

  • alhilo Profile Picture
    93 on at

    i face the below error

     

    The operation 'Initialize variable' can only be used at top level.

     

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 Automate

#1
11manish Profile Picture

11manish 298 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 289

#3
Henil Profile Picture

Henil 125

Last 30 days Overall leaderboard