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 / How increase variable ...
Power Automate
Answered

How increase variable in DataTable

(0) ShareShare
ReportReport
Posted on by 21

Hi everyone!

Please help me.

For example, I have an excel-file with 2 columns, when the first column is key and second is count.

KeyCount
A0
B0
C2
D3

 

Next, in my process I calculate other variable. For example it will be equal "C"

 

I want to increase "Count" in my DataTable from 2 to 3. How can I do it?

 

Thank you in advance!

  • DanielOlsson Profile Picture
    111 on at

    Make a loop to check each row of data table, test this example. Note how we loop the table and look for a result.

     

    1. Set variable %Row% =0

    2. ( start a new loop here ) Loop Exceldata[%row%] as per your choice, could be until the last line of the table.  

    3. Set variable Variable1 = Exceldata [%Row%]

    4. IF statement in the loop, where IF Variable1 = C 

    5. Message with box:  I found it %variable1% on row %row%

    6. End of IF statement

    7. increase variable row with 1

    8. end 

     

    Let it run and see what happens

     

  • Verified answer
    tkuehara Profile Picture
    667 on at

    Hi @Akobir 

     

    Are you trying to update a single value or the entire column?

     

    Anyways, here's how to update a value in a data table variable:

    Data table variable before update

    tkuehara_0-1626952927214.png

    Action to update a single value: %your_datatable_variable[row][column]%

    tkuehara_1-1626952985584.png

    Data table variable after update:

    tkuehara_2-1626953070830.png

    If this post helped you, please accept as solution

  • Akobir Profile Picture
    21 on at

    This is - what I need. Thank you!

  • Akobir Profile Picture
    21 on at

    Hi @tkuehara 

    Maybe you know else, how can I sort my Data table by any 3-d column?

  • Ajaya Profile Picture
    4 on at

    Not Working. when i  put this -- Exceldata[%row%] It Showing "Parameter 'Value': Syntax error.". 

    please Help me..

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
11manish Profile Picture

11manish 249 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 198

#3
David_MA Profile Picture

David_MA 197 Super User 2026 Season 2

Last 30 days Overall leaderboard