cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Joorge_c
Level: Powered On

Filtered Count from SP List to get Min Value to assign a Task in Planner

Hello All, thanks in advance for all your help!

The objective is to Count the number of Items per User to determine the who has the Minimum value, so we can then assign a Task via Planner

 

Im currently Getting Items from a List and creating 2 separate filters and from then to Count current Users with Items, from here Im building an Array / Table to define where I would then do the Min to determin who has the lowest Count and Create the Task in Planner.

 

My issue is dont know if this is the best approach, Im currently with a HTML table with separate columns for Each user, instead of a single column for me to do the MIN calculation.  Any pointers are highly appriciated!

 

 

1.png2.png

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Filtered Count from SP List to get Min Value to assign a Task in Planner

Hi @Joorge_c,

 

I have a method could find the min number of the Person, I post an instance to introduce this method:

1. I have some data with person name and number, just like below, it is similar to the output of Get items, for more clear, I create the data manually.

Annotation 2019-10-18 153159.png

2. Then I initialize two variables, one is integer variable named MinNumber to store min number, set the init value as the first person's number.

The other is object variable named Min person to store Person with min number, set the init value as the first person.Annotation 2019-10-18 155133.png

 

3. Put the Person variable into Apply to each action to traversal each item of the array.

4. Create a condition to determine the current item's number whether is less than MinNumber - If it is, set the min number as current item's number, then set the MinPerson as current person.

Annotation 2019-10-18 154554.png

 

Run result - you can create a compose action after Apply to each to check the output:Annotation 2019-10-18 155359.png

Best Regards,
Community Support Team _ Lin Tu
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

3 REPLIES 3
Super User
Super User

Re: Filtered Count from SP List to get Min Value to assign a Task in Planner

@Joorge_c 

Are you planning on using Flow to assign the task in Planner?  If not, the why not just create a view in SharePoint that groups by the assigned to column and includes totals?

 

There are a number of ways of approaching this isssue, but you could just use a max expression and use the Count compose action outputs as the parameters rather than creating an HTML table.

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Joorge_c
Level: Powered On

Re: Filtered Count from SP List to get Min Value to assign a Task in Planner

@ScottShearer  Thanks for your reply

 

Im planning to use Flows as a next step to Create the Planner Task with an Assignee based on the Min or Max value.

 

How could I differenciate from using the Max Count expression, the Name of the User, that I will then use in the next Task Action for Planner?.. I see I can use the Min or Max parameters using the Counts, but they return the Digit where is Min or Max, but how do I see the name of that Person with the Min or Max?

 

Thanks again!

Community Support Team
Community Support Team

Re: Filtered Count from SP List to get Min Value to assign a Task in Planner

Hi @Joorge_c,

 

I have a method could find the min number of the Person, I post an instance to introduce this method:

1. I have some data with person name and number, just like below, it is similar to the output of Get items, for more clear, I create the data manually.

Annotation 2019-10-18 153159.png

2. Then I initialize two variables, one is integer variable named MinNumber to store min number, set the init value as the first person's number.

The other is object variable named Min person to store Person with min number, set the init value as the first person.Annotation 2019-10-18 155133.png

 

3. Put the Person variable into Apply to each action to traversal each item of the array.

4. Create a condition to determine the current item's number whether is less than MinNumber - If it is, set the min number as current item's number, then set the MinPerson as current person.

Annotation 2019-10-18 154554.png

 

Run result - you can create a compose action after Apply to each to check the output:Annotation 2019-10-18 155359.png

Best Regards,
Community Support Team _ Lin Tu
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

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 179 members 5,177 guests
Please welcome our newest community members: