Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
David1906
New Member

Retro - Create old-style query in PowerQuery?

I've been linking and manipulating data in Excel since Office 2000, but I am stumped at trying to re-create in O365 something I once made in O2K. I had a query that would pull data into Excel, and then added subtotals to the table, all controlled through a VBA macro. (Relevant VBA commands: Range(TopCorner).Select, Selection.RemoveSubtotal, Selection.QueryTable.Refresh, and then Selection.Subtotal)

 

Power query only makes modern Table objects that cannot have subtotals. Is there any way to make a query in Excel that does not end up as a ListObject Table, and that can be manipulated the way I used to? Thanks.

1 ACCEPTED SOLUTION
edhans
Super User
Super User

No. You'd need to bring the data into the Excel Data Model, then create a Pivot table using that model (Power Pivot) which can have subtotals.

 

All tables created by Power Query or consumed within the same file are a ListObject Table for VBA.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

1 REPLY 1
edhans
Super User
Super User

No. You'd need to bring the data into the Excel Data Model, then create a Pivot table using that model (Power Pivot) which can have subtotals.

 

All tables created by Power Query or consumed within the same file are a ListObject Table for VBA.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors