How to Get Values From a Data Table in Power Automate Desktop (4 Ways)

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:

RowInvoice NoVendor NameAmountDatePayment MethodApprover NameStatus
0INV-001Delta Inc$12,0007/22/2026Bank TransferJohn DavisPending
1INV-002Acme Corp$8,5006/15/2026ACHPerry LopezApproved
2INV-003Bright Solutions$9,7525/14/2026CheckAlex CarterRejected
3INV-004Orion Technologies$15,2006/13/2026Wire TransferMiriam GrahamPending
4INV-005Bluewave Logistics$6,3004/12/2026Credit CardJoe NelsonApproved

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]%
Set variable action reading the Status and Payment Method of the first data table row by index

[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:

Flow variables pane showing the value Pending, Bank Transfer read from the data table

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']%
Set variable action reading four columns of the third data table row by column name

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']%.

For each action iterating over the DataTable variable and storing each row in CurrentItem

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:

Set variable action creating a RowIndex counter with the value 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:

If action checking whether RowIndex is equal to 0
Set variable action storing the Vendor Name of the current row

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

Increase variable action adding 1 to RowIndex on each loop

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

Power Automate Desktop flow with Create new data table, a RowIndex counter, For each, If and Increase variable
Flow variables pane showing the VendorName value Delta Inc

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

If action checking whether the Status column of the current row equals Pending

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:

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.