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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ROBORG
New Member

Why is my first row not being used to name columns?

I imported a table into Power BI, but the first row is not being used to name the columns.  How do specify "use first row for column names?"

13 REPLIES 13
Anonymous
Not applicable

In the Power Query Editor undert the tab icon at the label list you can define forst row as column

rrataj_0-1602854253785.png

 

 

Best 

Rafal

Anonymous
Not applicable

This will resolve the issue:

First, delete the imported data and,

 

1. Go to Get Data>Excel>Select Your Excel File>Open. (Basically reloading data).

2. In Navigator Dialog box select your spreadsheet(s).

3. Don't Click Load (If you do, delete the loaded data and start over again).

4. Click Edit.

5. Click on small table icon right at the junction of first row and first column.

6. Click "Use first row as headers".

7. Click "Close and apply". 

 

That should address the issue.

 

 

 

 

Anonymous
Not applicable

The answer below simply doesn't work for me.  Simple xlsx file with a single sheet saved as a table with header row.  Only 3 'fields' are available.  I cannot seem to locate where any settings are in PowerBI to change it and honestly it doesn't make sense that I have to.  

Outstanding, thank you. I don't understand why so many of the commenters were not reading the question properly. You clearly have and this is exactly what was needed. 

Alan_Bull
Frequent Visitor

If the first column in Excel doesn't have numberes in in, it won't use the first row as headres.  If you put a dummy column in there as the first one, with numbers under the header, it does use the first row for headers.

 

I did some testing with a simple spreadsheet.  so here's what I had to do.

 

Blah Blah Blahxxxyyy 
1apet city 
2bacme dog food
3cbest bites dog food

 

 

Once you import it, just delete the first Blah Blah column.

 

My question is, how do I report this stupid bug to MS?

 

Cheers,

Alan Bull

Alan_Bull
Frequent Visitor

I've been having the same issue.  I set up a simple Excel spreadsheet with 2 worksheets.  Each sheet has tow columns:

 

sheet 1 is:

xxxyyy 
apet city 
bacme dog food
cbest bites dog food

 

and sheet 2 looks like:

xxxyyy 
1pet city 
2acme dog food
3best bites dog food

 

If I connect to sheet 1, the column headers are NOT found.

 

If I connect to sheet 2, the column headers ARE found.

 

Some stupid bug is looking at the values in column 1 and if the are not numeric, it doesn't treat them as headers.

 

So if I add a dummy first column in with numbers instead of letters it works!

 

Blah Blah Blahxxxyyy 
1apet city 
2bacme dog food
3cbest bites dog food

 

 

So how do I report this bug to MS for them to fix?

 

Alan Bull

 

 

condor5635
New Member

seems ridiculous that it does not recognize automatically that my first row is a header.  Geeze it is bold and highlighted and set for print titles and yet it wants to use COLUMN1 and COLUMN2 and put the headers as part of the data set.... Does not seem that smart.  I have to go in and tell it to use the first row

condor5635
New Member

seems ridiculous that it does not recognize automatically that my first row is a header.  Geeze it is bold and highlighted and set for print titles and yet it wants to use COLUMN1 and COLUMN2 and put the headers as part of the data set.... Does not seem that smart.  I have to go in and tell it to use the first row

@ROBORG If you are referring to loading an Excel file into the Desktop here is what you can do.

Go to the Data tab (table icon on left side) - Click on Edit Queries in the toolbar - click the "Select first row as headers" in the toolbar on upper right. Close and Apply.

 

- Be sure to post your question in the right area in the future, it will help narrow down where you are having the issue. Service, Desktop, etc.


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

Seems ridiculous that it does not recognize automatically that my first row is a header. Geeze it is bold and highlighted and set for print titles and yet it wants to use COLUMN1 and COLUMN2 and put the headers as part of the data set.... Does not seem that smart. I have to go in and tell it to use the first row.  Am i missing something?

But Sir that will again be treated as data and we are not getting the results properly.

Hello,

 

If headers are being used as data... you can always remove them from the query editor 😄4.png

 

 

 

 

But Sir that will again be treated as data and we are not getting the results properly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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