web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / auto increment where a...
Power Automate
Suggested Answer

auto increment where another field matches

(1) ShareShare
ReportReport
Posted on by 2
Essentially im trying to replicate this excel formula in powerautomate =COUNTIF($A$2:A2,A2)
 
it check for a duplicate value in A2 and increments the number if it does
 
type ID Image ID
1 1
1 2
1 3
3 1
Categories:
I have the same question (0)
  • David_MA Profile Picture
    12,980 Super User 2025 Season 2 on at
    I don't think I really understand your requirement, but do this to see if this is what you are asking:
    • Create an integer variable and set the default value to the initial value you want to increment.
    • Then in your flow where you need to increment, insert an Increment variable action.
      • Point it to the variable in the above step.
      • Increment it by your desired amount.
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,362 Super User 2025 Season 2 on at
     
    So essentially you have data, you want to point to a specific Row in your data, compare that against some particular data value, then in the current Row, update its value specifically.
     
    It is possible to do this, and David provided some guidance, but what I will add is, what you are missing to give us is the Context of when you plan and need this.
     
    What I mean is.
    Imagine you have an Excel sheet that you want to populate to SharePoint.
    You grab the data and before you insert the row into SharePoint, that's the point where you want to do this check, well then my answer would be different, than if you said you wanted to add it to an Array.

    The point being is, you can absolutely grab data from somewhere and have it return an array of data items (rows)
    You can then loop through that to impact another datasource (or the same) and do the calculation you want and by calculation I simply mean do the check of the value in whatever ROW is constant (you define) compared to the current row and update it WITHIN the action that will insert the data, NOT in the actual Array of data returned from Excel.
     
    Now, let's pretend instead, that you pulled Data from Excel.
    You wanted to create an Array of data to Email someone and you needed the functionality above.
    You could use the Select action, to pull ONLY the Columns from the Data you pulled from excel, you could then add an additional Column Named (Image Id) and in there put an expression that would calculate what value to put there.
    You could then use the Create HTML Table, to create a Table that looks like the above
    Then the Send Email Action to email it
     
    So totally possible, but depends on your scenario, how to implement it.
     
    Cheers,
     
    If this answers your question Please mark the answer as such and maybe a like
    Thanks!
  • Michael E. Gernaey Profile Picture
    53,362 Super User 2025 Season 2 on at
     
    Did either David or myself help you? Do you have feedback or still need help?
     
    If you have a resolution that does not match our responses, can you please share so it benefits someone else, or mark the resolution.
     
    Thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard