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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Amardeep100115
Post Prodigy
Post Prodigy

Import selected or listed columns from connected excel

How we can import listed columns from excel ?

 

Fo example 
i have sheet in which from A-Z column i just need A-C-U-D columns not rest, i know the option "remove Other Columns" but it should be have dynamically in query editor with those column name has in list in another table.

 

hope i am clear on my quetion

 

Thanks

AB
1 ACCEPTED SOLUTION

Is this still the same question?  My answer is to do with selecting columns where the column names are in a column (if that makes sense)

To make a column into a list, in Power Query, select the column and choose 'Convert to List' from the Transform menu.

View solution in original post

8 REPLIES 8
HotChilli
Super User
Super User

If you get a list in Power Query with the column names in it, you can use that list in the main query

 Table.SelectColumns(#"Renamed Columns", ColsList)

#"Renamed Columns" is just the previous step.

ColsList would be the name of the list

Spoiler
@HotChilli 

Could you please show me how to do this in BI sample file
AB

Is this still the same question?  My answer is to do with selecting columns where the column names are in a column (if that makes sense)

To make a column into a list, in Power Query, select the column and choose 'Convert to List' from the Transform menu.

Let me try this
AB

Hi , @Amardeep100115 

Follow these steps:

1.Select the required columns in Excel and apply the table format
(insert ->table ->create table)

3.png

 

2.The when you connect to excel in powerbi, please choose the "table 1" instead of "sheet1"

The result will show as below: The table contains only the data you want

6.png

 

BTY, you  also  can convet this table back to range

5.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.

 

I have 250 files in folders Every week we store same report and it's not possible to do this with each file Please share another way to do this in query editor

AB

Hi , @Amardeep100115 

I am a little confused, is your data source  a folder containing 250 excel sheets  or  multiple excel sheets ?

If is a folder ,you may refer to this  related post.

https://powerbi.tips/2016/08/load-multiple-excel-xlsx-files/

 

If the data source is from 250 separate tables and you want to still get 250 separate tables after modeling, there is no way.

Because even using function, only one table can be generated at a time

I'm sorry I have no good ideas for now. I would suggest you raise it to the support team for better advice.

 

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.

 

 

@v-easonf-msft 
I have 250 excel files in my folder not sheets

AB

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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