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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
acbisogni
Frequent Visitor

Copying query data to a new table witout connection to the database

I wanto to create a copy of a existing query to a new table, but I nee to copy only the data and not the source connection to the database. The new table will only copy the existing data in the source table. The new table has to be created in POwer query since I will perform some columns changes, like changing name, creating new columns base on combining queries, etc.

 

Is it possible?

 

Thanks, Adriano

2 ACCEPTED SOLUTIONS
shafiz_p
Super User
Super User

Hi @acbisogni  Yes, it is possible. First convert entire table to text using Binary.ToText and Json.FromValue. Then create a json file from the output text and convert that to fresh new table. See the images below:

This is the original table:

shafiz_p_0-1724496570691.png


Converted to Text (Red Highlighted Formula):

shafiz_p_1-1724496719592.png

 

This is output text. Select and copied to clipboard using Crtl+C:

shafiz_p_2-1724496790804.png


Created a new blank query and opened advance editor and write the formula. You can now delete steps from original table:

shafiz_p_3-1724497028361.png


Right click on the bytes file and click Json.

shafiz_p_4-1724497099533.png

 

Right click on the list header and select to table.

shafiz_p_5-1724497175703.png

 

Now click on the arrow head icon and expand column, and you are done with a fresh new copy of table without the source. Change data types manually and do you desired operation.

shafiz_p_6-1724497259872.png



Hope this helps.
If this solved your problem, please accept it as a solution!!

 


Best Regards,
Shahariar Hafiz

 

View solution in original post

p45cal
Super User
Super User

You could perhaps try right-clicking the table, choose Table, then Unlink from Data Source.

p45cal_0-1724598533807.png

Then click OK on the next dialogue box:

p45cal_1-1724598639533.png

The table will be disconnected from the query that created it, and that query will show as Connection only. You can right-click that query and load to… a fresh table whenever you want:

p45cal_2-1724598816443.png

 

View solution in original post

3 REPLIES 3
p45cal
Super User
Super User

You could perhaps try right-clicking the table, choose Table, then Unlink from Data Source.

p45cal_0-1724598533807.png

Then click OK on the next dialogue box:

p45cal_1-1724598639533.png

The table will be disconnected from the query that created it, and that query will show as Connection only. You can right-click that query and load to… a fresh table whenever you want:

p45cal_2-1724598816443.png

 

shafiz_p
Super User
Super User

Hi @acbisogni  Yes, it is possible. First convert entire table to text using Binary.ToText and Json.FromValue. Then create a json file from the output text and convert that to fresh new table. See the images below:

This is the original table:

shafiz_p_0-1724496570691.png


Converted to Text (Red Highlighted Formula):

shafiz_p_1-1724496719592.png

 

This is output text. Select and copied to clipboard using Crtl+C:

shafiz_p_2-1724496790804.png


Created a new blank query and opened advance editor and write the formula. You can now delete steps from original table:

shafiz_p_3-1724497028361.png


Right click on the bytes file and click Json.

shafiz_p_4-1724497099533.png

 

Right click on the list header and select to table.

shafiz_p_5-1724497175703.png

 

Now click on the arrow head icon and expand column, and you are done with a fresh new copy of table without the source. Change data types manually and do you desired operation.

shafiz_p_6-1724497259872.png



Hope this helps.
If this solved your problem, please accept it as a solution!!

 


Best Regards,
Shahariar Hafiz

 

dharmendars007
Super User
Super User

Hello @acbisogni , 

You can select the existing query or table and click on "Reference" so that this will now be affected by the changes done in database.

dharmendars007_1-1724488756469.png

 

If you find this helpful , please mark it as solution and remember to give kudos
 

Thank You

Dharmendar S

LinkedIN 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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