An accounts payable team I worked with kept a list of invoices in a Power Automate Desktop flow and wanted to pull out the ones still waiting for payment.
The data was already sitting in a data table variable; the question was how to get specific values out of it. If you’re coming from cloud flows, this is where Power Automate Desktop feels different: there’s no dynamic content panel, so you reach into a data table with variables and a simple bracket notation.
In this tutorial, I’ll show you four ways to do it, from reading a single cell to pulling out every row that matches a condition.
Quick answer: In Power Automate Desktop, read a single value with %DataTable[RowIndex][ColumnIndex]% or %DataTable[RowIndex]['Column Name']%. Row and column indexes start at 0, so %DataTable[0]['Status']% is the Status of the first row. To work with every row, loop through the table with For each. To keep only matching rows, use the Filter data table action.
How a data table works in Power Automate Desktop
A data table is a variable that holds rows and columns, much like a small worksheet. You usually get one by reading an Excel worksheet or a CSV file, extracting a table from a web page, or building one with the Create new data table action.
Two rules make everything else easy. First, indexes start at 0: the first row is row 0 and the first column is column 0. Second, you can refer to a column by name as long as the table has column headers, which it does when you create it with named columns or read Excel with First line of range contains column names turned on.
The sample data table
For the examples, I’m using a table of invoices built with Create new data table. It has seven columns and five rows:
| Row | Invoice No | Vendor Name | Amount | Date | Payment Method | Approver Name | Status |
|---|---|---|---|---|---|---|---|
| 0 | INV-001 | Delta Inc | $12,000 | 7/22/2026 | Bank Transfer | John Davis | Pending |
| 1 | INV-002 | Acme Corp | $8,500 | 6/15/2026 | ACH | Perry Lopez | Approved |
| 2 | INV-003 | Bright Solutions | $9,752 | 5/14/2026 | Check | Alex Carter | Rejected |
| 3 | INV-004 | Orion Technologies | $15,200 | 6/13/2026 | Wire Transfer | Miriam Graham | Pending |
| 4 | INV-005 | Bluewave Logistics | $6,300 | 4/12/2026 | Credit Card | Joe Nelson | Approved |
Notice the Row column on the left: that’s the index you use in formulas, not a column in the table itself. The column indexes run from 0 (Invoice No) to 6 (Status).
Method 1: Get a value by row and column index
The quickest way to read one cell is to give Power Automate Desktop both indexes. Add a Set variable action. In Set, name the variable, for example StatusPayment. Variable names can only contain letters, digits and underscores, so leave out spaces and hyphens. In To, enter:
%DataTable[0][6]%,%DataTable[0][4]%

[0] is the first row, [6] is the seventh column (Status), and [4] is the fifth column (Payment Method). Run the flow and open the variable in the Flow variables pane:

Indexes are fast, but they’re fragile: if someone adds a column to the table, index 6 suddenly points to something else. That’s why I prefer the next method in real flows.
Method 2: Get a value by row index and column name
When the table has column headers, use the column name instead of its number. It reads better and keeps working if the column order changes. To get the details of the third invoice (row 2), set a variable such as Invoice003Values to:
Vendor Name - %DataTable[2]['Vendor Name']%
Amount - %DataTable[2]['Amount']%
Payment Method - %DataTable[2]['Payment Method']%
Status - %DataTable[2]['Status']%

The column name goes in single quotes inside the brackets, and it has to match the header exactly, including spaces. For our table, the variable ends up holding Bright Solutions, $9,752, Check and Rejected.
You can also take several rows at once with slicing: %DataTable[0:3]% returns rows 0, 1 and 2 as a new data table. The number after the colon isn’t included.
Method 3: Loop through the rows with For each
When you need to look at every row, loop through the table. Add a For each action and set Value to iterate to %DataTable%. Each time the loop runs, CurrentItem holds one row, and you read its columns with %CurrentItem['Column Name']%.

Get a value from a specific row inside the loop
For each doesn’t give you the row number, so if you need it, keep your own counter. Before the loop, add Set variable with RowIndex set to 0:

Inside the loop, add an If that checks %RowIndex% Equal to (=) 0, and inside it a Set variable that stores %CurrentItem['Vendor Name']% in VendorName:


After the If, still inside the loop, add Increase variable to add 1 to RowIndex, so the counter moves along with the loop:

Here’s the finished flow. When it runs, VendorName holds Delta Inc, the vendor on row 0:


For a single row, %DataTable[0]['Vendor Name']% from Method 2 does the same job in one step. The counter pattern is worth knowing when your logic depends on the position of the row, such as “every tenth row”.
Collect the rows that match a condition
Now let’s get every invoice with the status Pending. Before the loop, add Set variable with PendingInvoices set to an empty value. Inside the loop, add an If with %CurrentItem['Status']% Equal to (=) Pending. (The screenshot uses the column index, %CurrentItem[6]%, which points to the same column.)

Inside the If, add Append line to text from the Text actions. Set Original text to %PendingInvoices% and Line to append to:
%CurrentItem['Vendor Name']% - %CurrentItem['Payment Method']% - %CurrentItem['Status']%
Then expand Variables produced and rename the output from Result to PendingInvoices. This step is easy to miss: Append line to text doesn’t change the original variable on its own, it creates a new one. Renaming the output to the same name is what makes the text grow with each match. After the run, PendingInvoices lists Delta Inc and Orion Technologies.
Method 4: Use the Filter data table action
If all you need is the matching rows, skip the loop. Under Variables > Data table, add Filter data table, choose %DataTable%, and add a rule: column Status, operator Equal to, value Pending. You can add more rules and combine them with And or Or.
The action returns FilteredDataTable with just INV-001 and INV-004. From there you can loop through it, write it to a CSV file, or use Retrieve data table column into list to get a simple list of the vendor names. For large tables, this is noticeably faster than looping, and there’s far less to go wrong.
A related action, Find or replace in data table, is useful when you want to know where a value is: it returns the row and column indexes of every match in a variable called DataTableMatches.
Common errors
“Item index is out of range” means you asked for a row or column that doesn’t exist. Remember that a table with five rows has indexes 0 to 4; check %DataTable.RowsCount% if you’re not sure.
“Column name doesn’t exist” usually means the table has no headers, or the name doesn’t match exactly. Check the headers in the Flow variables pane, including capitals and spaces.
If Power Automate Desktop won’t accept a variable name, it probably contains a space or a hyphen. Names can use letters, digits and underscores, and they can’t be reserved words such as if or loop.
For more on working with data tables and variables in desktop flows, see:
- Insert Row into Data Table in Power Automate Desktop
- Update Data Table Items using Power Automate Desktop
- Extract Data from an Excel using Power Automate Desktop
- Retrieve Excel Column Values Into List Using Power Automate Desktop
- Variables in Power Automate Desktop
- Concatenate Strings Using Power Automate Desktop
Frequently Asked Questions
How do I get a value from a data table in Power Automate Desktop?
Use %DataTable[RowIndex][ColumnIndex]% or %DataTable[RowIndex][‘Column Name’]%. For example, %DataTable[0][‘Status’]% returns the Status of the first row.
Do data table indexes start at 0 or 1 in Power Automate Desktop?
They start at 0. The first row is row 0 and the first column is column 0, as Microsoft explains in its variable data types documentation.
How do I filter a data table in Power Automate Desktop?
Use the Filter data table action with a rule such as Status Equal to Pending. It returns only the matching rows in a new variable called FilteredDataTable.
How do I get one column of a data table as a list?
Use the Retrieve data table column into list action and enter the column name or index. The result is a list variable called ColumnAsList.

I have worked with Microsoft technologies for more than 18 years, including SharePoint, Microsoft 365 and the Power Platform (Power Apps, Power Automate and Power BI), at companies like HP, TCS and KPIT. I started EnjoySharePoint in 2011 to share the solutions I build in real projects with readers in the United States, Canada, the United Kingdom, Australia, New Zealand and beyond. Microsoft has recognized this work with the Microsoft MVP award 13 times since 2014.