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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
dansee
New Member

How to copy selected rows from one table and paste to another table

Hi,

 

This looks like a simple question but i couldnt figure it out for Power BI.

 

I want to copy few selected rows from one table/query and paste into another table/query. Assuming the number of columns and data type are the same.

I do not want to append the whole tables together, as i just want a few selected rows.

Is there a simple step to this?

 

Both of my tables are from the web, so when i click on 'Source' in the Power Query steps column, i do not have a create rows option.

 

thanks!

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi , @dansee 

If these selected rows contain some filtering rules, you  can use  the function "Table.selectrows" to return a table of rows you want.

 

 

Table.SelectRows(table as table, condition as function) as table

 

 

Then you can  use the option" append  queries"  to append this new table to original table.

You also can consider  duplicating a new query then apply  filter  to rows before you append  queries .

When loading data, the rows filtered in the new query will  not be  imported into the data model.

11.png12.png

 

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

View solution in original post

3 REPLIES 3
v-easonf-msft
Community Support
Community Support

Hi , @dansee 

If these selected rows contain some filtering rules, you  can use  the function "Table.selectrows" to return a table of rows you want.

 

 

Table.SelectRows(table as table, condition as function) as table

 

 

Then you can  use the option" append  queries"  to append this new table to original table.

You also can consider  duplicating a new query then apply  filter  to rows before you append  queries .

When loading data, the rows filtered in the new query will  not be  imported into the data model.

11.png12.png

 

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

amitchandak
Super User
Super User

@dansee , you have to filter or append in power query. for dax try this

https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/

AlB
Super User
Super User

Hi @dansee 

Filter the two initial queries down to the number of rows you want in the final table and then append both queries

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.