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 Platform Community / Forums / Power Automate / Extracting count of va...
Power Automate
Unanswered

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?

 

Categories:
I have the same question (0)
  • Verified answer
    grantjenkins Profile Picture
    11,063 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

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 Automate

#1
Tomac Profile Picture

Tomac 497 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 477 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 242

Last 30 days Overall leaderboard