cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
zmansuri
Super User
Super User

GroupBy and Count

q7.jpg

 

Above is my SharePoint list. It's daily entry of candidate who are taking training with us. Daily sessions happens. And for every session attendance is recorded for candidate through choice column of SharePoint.

 

My Requirement:

Create a flow that will go through the above list and count how many times candidate was absent. There is another list called absent count. If candidate name is not in that list it creates the entry if it is there then just update the absent count. So in that list i have candidate names and how many days they were absent.

 

PS: This is one time operation so manual trigger is fine.

 

q8.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Dual Super User
Dual Super User

Hi @zmansuri,

 

One approach could be to just create a list view. This way you will get total absent number per Name in a view on the list itself. 

 

1. Filter on presence is No

 

customview_filterbypresence.png

2. Group By Name and use a Totals > count

groupbyname_count.png

 

If the view isn't sufficient you can retrieve those values with a Send an HTTP request to SharePoint action by using the RenderListDataAsStream method. Let me know if you need any help with that.

View solution in original post

3 REPLIES 3
Expiscornovus
Dual Super User
Dual Super User

Hi @zmansuri,

 

Just to double check.

 

Both the registration of the candidate and the presence/absence of a candidate are registered in the same Training_Days list? In other words, the Presence value would be set to no if the candidate is absent?

Yeas data is like this:

NamePresence
JohnNo
JohnYes
JaneNo
JaneNo

 

And i want to store it in another list like this:

NamePresence
John1
Jane2
Expiscornovus
Dual Super User
Dual Super User

Hi @zmansuri,

 

One approach could be to just create a list view. This way you will get total absent number per Name in a view on the list itself. 

 

1. Filter on presence is No

 

customview_filterbypresence.png

2. Group By Name and use a Totals > count

groupbyname_count.png

 

If the view isn't sufficient you can retrieve those values with a Send an HTTP request to SharePoint action by using the RenderListDataAsStream method. Let me know if you need any help with that.

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,544)