Forum Discussion
Copy data from query to multiple tables in query editor
Hi,
I use four instances of a query (about 600.000 rows).
I need these four versions because I need to use different filtering to calculate different metrics.
So when I refresh the data the query runs 4 times, which takes al very long time....
Is there a solution for this?
Is it possible to copy the data from the query into a four tables in the query editor, so it will refresh only once?
Thank you!
govi
4 Replies
- amitchandakSuper User
You can create
New Table = Old table.
But if you need just for dates. Please refer you can have multiple joins and use them as per need
HR-Analytics-Active-Employee-Hire-and-Termination-trend
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners ,
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges
Connect on Linkedin- goviHelper II
Hi amitchandak,
"New Table = Old table" can be done in DAX indeed. But I need to modify the "New Table" in the Query Editor. So the copying has to be done in the Query Editor. Is this possible?
Thank you!
govi
- v-xicaiCommunity Support
Hi govi ,
If the data structures of these tables are the same , you might use Append feature to combine the these tables into one table, see more about how to append: Append vs. Merge in Power BI and Power Query . While before using append feature, you might add custom column to distinguish and identify the different tables , see setting like below.
If the data structure is different between these tables , you may create calculated table like DAX below to get combine table.
For example:
New table 1= UNION( SELECTCOLUMNS('Table1',"Name1",[Description],"Name2",[Amount]), SELECTCOLUMNS('Table2',"Name1",[Description],"Name2",[Amount]), SELECTCOLUMNS('Table3',"Name1",[Description],"Name2",[Amount]), SELECTCOLUMNS('Table4',"Name1",[Description],"Name2",[Amount])) New table 2= UNION(Table1,Table2,Table3,Table4)Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.