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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ovetteabejuela
Impactful Individual
Impactful Individual

Power Query | First 2 Columns (Excel)

Hi,

 

Need some help.

 

Basically I'm expanding a Table where I only need the first 2 columns, the problem with that table(source) is that there is actually no column names. So it's like the first row is already a data.

 

So, I'm in this line now:

 

    #"Expand Step Name" = Table.ExpandTableColumn(#"Previous Step", "Column Name", {"a data in column 1, row 1", "a data in column 2, row 1"}, {"a data in column 1, row 1", "a data in column 2, row 1"})

 

The problem is that all the workbooks would have different values in both Column 1, Row 1 and Column 2, Row 1 .

 

That's were I'm needing help.

 

4 REPLIES 4
RMDNA
Solution Sage
Solution Sage

@ovetteabejuela,

 

The most simple solution I can think of: is there a way to get column names?

 

I find it hard to believe that any significant amount of data would be stored in tables without column names.

Yes I've thought of that, the creator of the source really did not intend to make it that way - database friendly I mean.

 

If I would have to insert column names then I would have to do it to multitudes of password protected workbooks, could be a tedious process.

 

Open Workbook

Unprotect Workbook

Unhide Sheet

Unprotect Sheet

Go to the concerning tab

Insert a row

Add the Header Names

Hide Sheet

Protect Sheet

Protect Workbook

Oh, I totally agree with you - that would suck. My answer remains the same, though: do you have access to this person to make them properly add column names, or to the source itself?

 

If not, in your current situation, I can't think of a way to accomplish what you want. If the data is essentially random with no consistent structure, there's not much Power BI can do.

"that sucks" - yeah exactly same feeling I got when I found out. I can try to convince the owner but I'm still kind of hoping that there's still a 'M'-agic available for situations like this.

 

Thanks for your input.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors