web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Extracting count of variable from column within Sharepoint table

(0) ShareShare
ReportReport
Posted on by

Hello all,

 

I am trying to build a flow that extracts the count of various values from a SharePoint table and updates these values into a new row of an excel table.

 

The SharePoint table contains multiple columns. One column contains the status of the entry and has the value either 'Open' or 'Closed'

 

I successfully counted the total number of entries (or rows) in the SharePoint table using 'Get Items' and 'Compose' and deposited this value into my excel table.

 

I need to extract the number of entries in the Status column that have the value 'Open'. From this I can then derive the number of entries that are 'Closed'.

 

update excel flow.PNGfilter array output.PNG

As you can see above my current method takes a long time to run.

Also, the filter array block correctly filters all of the 'Open' entries, but I need the number of these, and I can't figure out how to output this. FYI: After counting the number of entries myself in the output I get the expected number. 

 

Does anybody have a solution?

 

I have the same question (0)
  • Verified answer
    grantjenkins Profile Picture
    11,059 Moderator on at
    Re: Extracting count of variable from column within Sharepoint table

    If you've got your Filter array containing only items where the Status is Open, then you can just use a Compose or Variable with the following expression to count how many items are in your Filter array.

     

    length(body('Filter_array'))

     

    You can then get the number of item's that don't have a Status of Open (Closed) by subtracting the length of that output from the length of Get items.

     

    sub(length(outputs('Get_items')?['body']), outputs('Compose_Open'))

     

    grantjenkins_0-1667220427511.png

     

  • Community Power Platform Member Profile Picture
    on at
    Re: Extracting count of variable from column within Sharepoint table

    Thank you, this worked!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 666 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 382 Moderator

#3
developerAJ Profile Picture

developerAJ 254

Last 30 days Overall leaderboard