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

Counting with Grouping

I'm attempting to create a Flow that counts ServiceNow tickets by Impact.

 

My count is: 

length(body('List_Records')?['result'])
 
The using the Length function as a Count only seems to work if it's the only field I have in the payload. But with the additional field, it counts it twice.

 

flow.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Counting with Grouping

Hi @ChadToney,

 

Could you please explain a bit more about your needs?

Do you want to count the ServiceNow ticket based on Impact dynamic content (group ticket by Impact content)?

 

The issue is confirmed on my side, I suppose that you want to group ticket by Impact dynamic content. You could consider take a try to add a Filter array action to count total ticket which has same Impact value:12.JPG

 Note: left input box of Condition box of "Filter array" set to following formula:

item()?['Impact']

Then, using the following formula as your count and fill it within your Payload field of "Add rows to a dataset":

length(body('Filter_array'))

 

If you want to add only one row to a dataset based on Impact dynamic content even though there are many records which have same Impact content, I afraid that there is no way to achieve your needs in Microsoft Flow currently.

 

Best regards,

Kris

Community Support Team _ Kris Dai
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

1 REPLY 1
Community Support Team
Community Support Team

Re: Counting with Grouping

Hi @ChadToney,

 

Could you please explain a bit more about your needs?

Do you want to count the ServiceNow ticket based on Impact dynamic content (group ticket by Impact content)?

 

The issue is confirmed on my side, I suppose that you want to group ticket by Impact dynamic content. You could consider take a try to add a Filter array action to count total ticket which has same Impact value:12.JPG

 Note: left input box of Condition box of "Filter array" set to following formula:

item()?['Impact']

Then, using the following formula as your count and fill it within your Payload field of "Add rows to a dataset":

length(body('Filter_array'))

 

If you want to add only one row to a dataset based on Impact dynamic content even though there are many records which have same Impact content, I afraid that there is no way to achieve your needs in Microsoft Flow currently.

 

Best regards,

Kris

Community Support Team _ Kris Dai
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 (Last 30 Days)
Users online (6,744)