Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi guys,
I'm having a problem with my import in the query editor. I am trying to pull data from a master workbook that we keep for weekly sales:
My problem is that:
An example of a Canadian store excel worksheet is below, as you can see the first set of weeks 1-52 is the $USD weekly sales whilst the second set of weeks 1-52 (in the lower half of the worksheet) is the $CAD weekly sales. The weekly sales are reported in Canadian dollar and then we convert it to the $US dollar amount.
I have used a blank query and this formula to get the workbook = Excel.Workbook(FileContents("name of workbook.xlsm", null, true)
I only need the first set of weeks 1-52 from each worksheet but as stated above, for the canadian stores it's importing both sets of weeks 1-52.
Any help would be appreciated! And thanks for the great community Power BI!
Solved! Go to Solution.
Hi @fatanalyst,
=> I only need the first set of weeks 1-52 from each worksheet but as stated above, for the canadian stores it's importing both sets of weeks 1-52.
In your scenario, you want to import the top 52 rows of the worksheet into Power BI. Right?
As I know, currently it is unable to separate the data in one same sheet directly and load the first part of the data into Power BI. But to achieve your requirement, you can try following method:
1. The easiest way, after you importing the entire worksheet. In Home pane there're options Keep Rows or Romove rows.
2. Add a flag row in your worksheet, then use Power Query function Table.SelectRows() to check this row and only import the rows before this flag row.
Thanks,
Xi Jin.
Hi @fatanalyst,
=> I only need the first set of weeks 1-52 from each worksheet but as stated above, for the canadian stores it's importing both sets of weeks 1-52.
In your scenario, you want to import the top 52 rows of the worksheet into Power BI. Right?
As I know, currently it is unable to separate the data in one same sheet directly and load the first part of the data into Power BI. But to achieve your requirement, you can try following method:
1. The easiest way, after you importing the entire worksheet. In Home pane there're options Keep Rows or Romove rows.
2. Add a flag row in your worksheet, then use Power Query function Table.SelectRows() to check this row and only import the rows before this flag row.
Thanks,
Xi Jin.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 127 | |
| 88 | |
| 78 | |
| 66 | |
| 65 |