Duplicate query without re-running the original?

macfuller

Active Member
Joined
Apr 30, 2014
Messages
319
Office Version
  1. 365
Platform
  1. Windows
I'm not clear if there's a way to duplicate the results of a query without re-running it.

I generate a calendar table from a data source's start and end dates and finding the Table.Max and Table.Min takes a long time with 10+ million rows.
Code:
    MaxDate = Record.Field(Table.Max(ChangedType, SourceDate), SourceDate),
    MinDate = Record.Field(Table.Min(ChangedType, SourceDate), SourceDate),

I'd like get a copy of the calendar table to reference data tables further down the star schema, but when I choose "Duplicate" on the query it generates the full query code. Is there a way to just copy the finished rows of the calendar table to a new table?

In more detail, the original calendar table references the Purchase Order tables. Purchase Orders in turn relate 1:many to voucher payments. However, we have vouchers created that don't require a PO. So any filter applied to lookup tables that hit the PO data table first screen out the non-PO values.

An alternative to a second calendar table might be a USERELATIONSHIP statement for each of the lookup tables to go against the Voucher table instead of the PO table - if that's true, which one would have the least performance impact?
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Right click any query and select reference. This will give you a linked copy that you can do what ever you want with. When the source changes, the linked query will change.

i doubt there would be different performance, just use what makes most sense. If you want to put filters on both tables, you will need 2 tables.
 
Upvote 0

Forum statistics

Threads
1,214,377
Messages
6,119,185
Members
448,872
Latest member
lcaw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top