Power BI: When trying to load Excel file, not all columns are getting loaded, few are…
- User
Power BI: When trying to load Excel file, not all columns are getting loaded, few are trimmed. How ever when i delete the first row all are loaded, why is this
- Assistant
There could be a few reasons why not all columns are being loaded or some are getting trimmed when trying to load an Excel file in Power BI. Here are a few possible explanations:
-
Detection of Header Row: Power BI tries to detect the header row in the Excel file to determine the column names. If the first row of your Excel file contains data that is not recognized as headers, Power BI may trim or exclude those columns. Deleting the first row might make Power BI consider the second row as the header row, resulting in all columns being loaded.
-
- User
Ok, i need to first remove the first row before loading, i need to automate this in Power BI
- Assistant
To automate the process of removing the first row before loading an Excel file in Power BI, you can use the Power Query Editor. Here's how you can achieve this:
-
Open Power BI and go to the "Home" tab. Click on "Get Data" and select "Excel" from the drop-down menu.
-
Browse and select the Excel file you want to load.
-
In the Power Query Editor window, select the sheet that contains the data you want to load.
-
Right-click on the first row and select "Remove Rows" -> "Remove Top Rows" from the context menu.
-
In the "Remove Top Rows" dialog box, enter the number of rows you want to remove (in this case, 1 for the first row) and click "OK".
-
Verify that the first row has been removed from the preview data.
-
Click on "Close & Apply" in the Home tab to load the modified data into Power BI.
By following these steps, the Power Query Editor will automatically remove the first row before loading the data into Power BI. You can then refresh the data in Power BI to apply the same transformation to new Excel files in the future.
-