cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
tilldunk Frequent Visitor
Frequent Visitor

Creating new table out of existing one

Hello,

 

I got a table with a time column and severeal component columns (in this example only five components, in reality distinctly more):

 

7.PNG

 

What I am trying to do is creating a new table as a new query out of selected columns (as below) but still keep the original query/table.

 

8.PNG

 

The only way I achieved this goal was to create a new query for every selected column (in this example time, comp1, comp2) and then append these new queries. In fact, if you only have five components it is pretty easy and fast to manage but in reality I got a whole bunch of columns and new queries I want to extract.

 

My question is therefore as follows: Is there any way to somehow copy selected columns out of the original table and- by one step- paste them into a new query?

 

Any help will be highly appreciated, 

best regards,

Till

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Creating new table out of existing one

Hi @tilldunk,

 

You can try to add a blank query source with below formulas.

 

let
    Source = Table.SelectColumns('Original Source Name',{'Column Name','Column Name2'})
in
    Source

Sample:

let
    Source = Table.SelectColumns(Sheet3,{"Country","Col A"})
in
    Source

10.PNG9.PNG

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |

View solution in original post

5 REPLIES 5
bsas Member
Member

Re: Creating new table out of existing one

Hi @tilldunk,

 

You can duplicate table (then delete what you want) in query mode or use "copy entire table" and then past it in new table.

 

Untitled.png     Untitled.png

Community Support Team
Community Support Team

Re: Creating new table out of existing one

Hi @tilldunk,

 

You can try to add a blank query source with below formulas.

 

let
    Source = Table.SelectColumns('Original Source Name',{'Column Name','Column Name2'})
in
    Source

Sample:

let
    Source = Table.SelectColumns(Sheet3,{"Country","Col A"})
in
    Source

10.PNG9.PNG

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |

View solution in original post

tilldunk Frequent Visitor
Frequent Visitor

Re: Creating new table out of existing one

Works totally fine, thank you!

 

Best regards, Till

zlokesh Member
Member

Re: Creating new table out of existing one

I am not able to do the same. Getting below error.

 

Table create error.JPG

Naram Frequent Visitor
Frequent Visitor

Re: Creating new table out of existing one

Hello,

Trying to create a new query from the existing "Master" Query using below formula:

let
Source = Table.SelectColumns('Original Source Name',{'Column Name','Column Name2'})
in
Source

which works fine, however I am looking to see if there is any other formula which would do the same but in a way that it will create the new query with a range of columns , for example Column 20- 67, basically not needing to write all the column names one by one.

 

Thank you in advance

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 138 members 1,559 guests
Please welcome our newest community members: