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

Filters on 4th row of the power query

excel.PNG

 

 

power Query.PNG

 

Hello,

 

We have a requierment to convert one of the excel report in power query  data connection using excel(it will be refreshed every month,and then we need to add som custom columns in it

There is one problem In the excel ,the filter dropdown is on 3rd row from the top ,which i am unable to acheive in power query.

 

Is there any workaround for this?

 

Your help will be much appreciated.

Thank You,
Mam

1 ACCEPTED SOLUTION

Accepted Solutions
edhans Super Contributor
Super Contributor

Re: Filters on 4th row of the power query

You can fix this one of two ways.

  1. In Power Query, your first transformation could be to remove top 3 rows.
    1. On Home Tab, click the Remove Rows drop down, Remove Top Rows, then tell it to remove 3 rows.
    2. Then on Home Tab, tell it to use "First Row as Headers"
  2. The better method is in Excel, select the range of data you are pulling and press CTRL-T to convert it to a table. Then in Power Query (Power BI or Excel, doesn't matter) you want to use the Table you created, probably called Table1 if you didn't rename it, and not the sheet the data is on.

 

It is always always always better if your data in an Excel XLSX/XLSM/XLSB file is in a true Excel table vs a sheet. That way no matter where the table is moved (due to inserted columns/rows, etc), Power Query can always find it and no need to redo transformations.

 

For example, in solution #1 above, the solution will break as presented if someone inserts a row and give you the file back to refresh in Power BI because now there are 4 rows you need to remove. If it is a table, then solution #2 will still work because it knows where the table lives.

View solution in original post

2 REPLIES 2
edhans Super Contributor
Super Contributor

Re: Filters on 4th row of the power query

You can fix this one of two ways.

  1. In Power Query, your first transformation could be to remove top 3 rows.
    1. On Home Tab, click the Remove Rows drop down, Remove Top Rows, then tell it to remove 3 rows.
    2. Then on Home Tab, tell it to use "First Row as Headers"
  2. The better method is in Excel, select the range of data you are pulling and press CTRL-T to convert it to a table. Then in Power Query (Power BI or Excel, doesn't matter) you want to use the Table you created, probably called Table1 if you didn't rename it, and not the sheet the data is on.

 

It is always always always better if your data in an Excel XLSX/XLSM/XLSB file is in a true Excel table vs a sheet. That way no matter where the table is moved (due to inserted columns/rows, etc), Power Query can always find it and no need to redo transformations.

 

For example, in solution #1 above, the solution will break as presented if someone inserts a row and give you the file back to refresh in Power BI because now there are 4 rows you need to remove. If it is a table, then solution #2 will still work because it knows where the table lives.

View solution in original post

Mam1004 Frequent Visitor
Frequent Visitor

Re: Filters on 4th row of the power query

Thanks for your response Edhans,

 

I already used method 1 to solve my problem,but i think the 2nd approach will be more accurate for issue.I am going to use that.

 

Thanks ,

Mam

Helpful resources

Announcements
Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Top Kudoed Authors
Users Online
Currently online: 247 members 2,858 guests
Please welcome our newest community members: