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
Anonymous
Not applicable

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
edhans
Super User
Super User

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.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

2 REPLIES 2
edhans
Super User
Super User

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.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
Anonymous
Not applicable

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

Top Solution Authors
Top Kudoed Authors