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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Sequentially number ro...
Power Automate
Unanswered

Sequentially number rows using a formula

(1) ShareShare
ReportReport
Posted on by 44

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.

2024-07-09_CSV Table question.jpg
Categories:
  • Shravan Profile Picture
    128 on at

     

    • 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.

     

  • Alchemy Profile Picture
    44 on at

    Hi Shravan,

     

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

     

    Thanks for your help.

     

    Kind regards,

     

    Stuart.

  • Chriddle Profile Picture
    8,729 Super User 2026 Season 2 on at

    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
    

     

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 355

#2
11manish Profile Picture

11manish 336 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard