cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
HazemSaleh
Helper I
Helper I

Datable query

Hello, 

Im extracting data from excel to a data table , is it possible to query the datatable without iterating throw ever item in it?

And if its possible how to get the SUM of a cloumn? im trying all the syntax but no luck.
Select SUM [cloumn name ] from SHEET1 where.... never worked for me.

1 ACCEPTED SOLUTION

Accepted Solutions
VJR
Super User
Super User

Use it as follows:

Select SUM(Age) from [Sheet1$]

 

VJR_1-1669092008868.png

 

VJR_0-1669091959680.png

 

 

Regarding your first query you can find a value or update the datatable using below actions.

 

VJR_2-1669092142440.png

 

 

Check the Datatable section for other ways to directly access any particular row

Variable data types - Power Automate | Microsoft Learn

 

View solution in original post

7 REPLIES 7
VJR
Super User
Super User

Use it as follows:

Select SUM(Age) from [Sheet1$]

 

VJR_1-1669092008868.png

 

VJR_0-1669091959680.png

 

 

Regarding your first query you can find a value or update the datatable using below actions.

 

VJR_2-1669092142440.png

 

 

Check the Datatable section for other ways to directly access any particular row

Variable data types - Power Automate | Microsoft Learn

 

GJH
Frequent Visitor

VJR, I believe the SQL statement is correct but the error says that its Invalid? 

GJH_0-1669769046828.png

 

Is there a space in your actual sheet name like you have given in the query? -> sheet 1$

Also check the upper and lower case.

VJR…silly me! Thanks, I’ll check tomorrow 

GJH
Frequent Visitor

VJR, this error is returned

Should the Filter statement be part of the path?

GJH_0-1669837959877.png

I tried a semicolon and placing it in parenthesis but got this error

GJH_1-1669838173416.png

Apology for my naivety!

 

  

 

The file extension in the screenshot is showing as .xlxs whereas the correct extension of an Excel file is .xlsx

VJR, thank you

i didn’t use the SQL statement but will experiment later. I found SUBTOTAL(109, ref1, [ref2],…) worked well

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (2,081)