cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted
Community Support
Community Support

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
Highlighted
Community Support
Community Support

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
FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,031)