Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Sequentially number rows using a formula

(1) ShareShare
ReportReport
Posted on by 41

Hello,

 

I'm creating a CSV table with data for internal requests. Each line should have a number, starting at 10 and sequentially increasing by 10 i.e. [10, 20, 30, etc.], so that each record can be more easily referred to.

 

Is there a formula that can be added to the Value of the Item column, which provides the necessary functionality?

 

Kind regards,

 

Stuart.

  • Chriddle Profile Picture
    7,793 Super User 2025 Season 1 on at
    Re: Sequentially number rows using a formula

    No need for an Apply to each, a variable and all the stuff that makes flows complicated.
    Just make use of the function range() and add a new property with a Select:

    Chriddle_0-1721028902697.png

     

    Select

    From

     

    range(0, length(outputs('Compose')))

     

    Map

     

    addProperty(
    	outputs('Compose')[item()],
    	'RowNo',
    	mul(
    		add(item(), 1),
    		10
    	)
    )

     

     

    Result:

     

    Title,Score,RTime,RowNo
    Item 0,2000,12,10
    Item 1,2001,11,20
    Item 2,2000,10,30
    Item 3,2001,9,40
    Item 4,2000,8,50
    Item 5,2001,7,60
    Item 5,2000,6,70
    

     

     

  • Alchemy Profile Picture
    41 on at
    Re: Sequentially number rows using a formula

    Hi Shravan,

     

    I'm yet to attempt this, but I'll try to get to it soon.

     

    Thanks for your help.

     

    Kind regards,

     

    Stuart.

  • Shravan Profile Picture
    128 on at
    Re: Sequentially number rows using a formula

     

    • Initialize Variable

      • Add an action to initialize a variable (Initialize variable).
      • Set the name to counter, type to Integer, and value to 10.
    • Apply to Each Loop

      • Add an "Apply to each" action to loop through your data.
      • Inside the loop, add the following actions:
    • Compose Action to Set Value

      • Add a Compose action.
      • Set the input to the value of the counter variable.
    • Create CSV Table Action

      • Add an action to create the CSV table (if not already added).
      • In the column where you want the sequential numbers, use the output of the Compose action for the value.
    • Increment Variable

      • Add an action to increment the variable (Increment variable).
      • Select the counter variable and set the value to 10.

     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492