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

Flow to count the amount of times a certain value is submitted

Hi there,

 

My flow so far is as follows:

 

Created Form from Excel Online

 

Once it's filled in, it will send out a notification via email with all the details needed.

 

I need to add an operation where it will count the number of times the input has been added.

 

e.g.image.png

 

 

 

 

 

Each time 'Mike' is entered, the value on the right column will increase by 1. 

 

At the moment I can't do this as Excel doesn't allow formulas with Flow. 

 

Is there a way I can do this with Data Operations?

 

image.pngFlow

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Flow to count the amount of times a certain value is submitted

Hi @ms1994 ,

 

You could refer to the following method to configure Flow.

 

  • Use Filter Query to filter out rows with the same name in the table.
  • Configure length() function to get the number of rows. If it is less than 0, the count is 1.
  • If the result is greater than 0, count is incremented by one on the number of rows.

Expression reference:

length(body('List_rows_present_in_a_table')?['value'])
add(length(body('List_rows_present_in_a_table')?['value']),1)

Image reference:

23.PNG24.PNG

Hope it helps.

 

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

2 REPLIES 2
Dual Super User
Dual Super User

Re: Flow to count the amount of times a certain value is submitted

Hi @ms1994 

 

Please see the screenshots below:j1.PNG

 

J2.PNG

 

I initialised an empty integer variable and set that to the value from the get row action (I used the expression because the value in my excel is stored as text)

 

int(body('Get_a_row')?['Column2'])

Then I am incrementing that value by 1 and updating teh row. I am identifying the row by the response from the form. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Community Support Team
Community Support Team

Re: Flow to count the amount of times a certain value is submitted

Hi @ms1994 ,

 

You could refer to the following method to configure Flow.

 

  • Use Filter Query to filter out rows with the same name in the table.
  • Configure length() function to get the number of rows. If it is less than 0, the count is 1.
  • If the result is greater than 0, count is incremented by one on the number of rows.

Expression reference:

length(body('List_rows_present_in_a_table')?['value'])
add(length(body('List_rows_present_in_a_table')?['value']),1)

Image reference:

23.PNG24.PNG

Hope it helps.

 

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

Helpful resources

Announcements
firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

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 Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,419)