cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kodnil2020
Helper I
Helper I

Find Count of Active Users for a department

Hello,

 

I am trying to find active users for a department and store it in variable. The data is stored in two different SP lists. It will be great help if someone help here. Sample Data:

 

DepartmentUserID
Dept1User111
Dept1User212
Dept1User313
Dept1User414
Dept1User515
Dept1User616
Dept2User717
Dept2User818
Dept2User919
Dept2User1020
Dept2User1121
Dept2User1222

 

Table 2:

IDActive
111
121
131
141
151
161
171
181
191
201
210
220

 

Output: 

DepartmentCount
Dept16
Dept24
1 ACCEPTED SOLUTION

Accepted Solutions

 

Hi @kodnil2020 ,

 

You can consider creating a lookup column in the first list to correspond to the item in the second list so that we can summarize the data in the two lists.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
kodnil2020
Helper I
Helper I

I could managed to get to half way using this post.

 

So far i have captured departments in Array from table 1. Need to find count from table 2

Capture.PNG

v-bacao-msft
Community Support
Community Support

 

Hi @kodnil2020 ,

 

I have a question, do the IDs in the two lists correspond? It seems that this is unreasonable. If an item in a list is deleted, then the ID will not correspond, because the ID is self-increasing and has a unique value, so it is impossible to keep the same.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-bacao-msft ,

 

I agree with you.

 

"ID" column in the sample data is just for reference and it can not be SharePoint List "ID" column.

We need to treat it as Unique ID of the employee.

 

Intent is to find active employee count for each department and push it to another list.  

 

Hi @kodnil2020 ,

 

You can consider creating a lookup column in the first list to correspond to the item in the second list so that we can summarize the data in the two lists.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,764)