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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Recoba88
Helper III
Helper III

Make Headers from two different columns (Power Query)

HIi,

 

I want to make the table below to this table 

 

Header 1 Header 2 Header 3 Header 4 Header 5 Header 6 Header 7...

 

DATA1     DATA2     DATA3   DATA4     DATA5     DATA6 

 

321321321.png

 

ANY IDEA HOW?

1 ACCEPTED SOLUTION
MarcelBeug
Community Champion
Community Champion

Yes, with the following code; replace Source with the name of your previous query step:

 

= Table.FromRows({Source[Column2]&Source[Column4]},Source[Column1]&Source[Column3])
Specializing in Power Query Formula Language (M)

View solution in original post

4 REPLIES 4
MarcelBeug
Community Champion
Community Champion

Yes, with the following code; replace Source with the name of your previous query step:

 

= Table.FromRows({Source[Column2]&Source[Column4]},Source[Column1]&Source[Column3])
Specializing in Power Query Formula Language (M)

Thanks!

 

What do you suppose to do in this case ?

 

 image001 (3).png

 

 

 

The code didn't work if I have null "headers" . I tried to create custom column and change null value to some different value like "1" but it didn't work 

Topic this is continued here.

Specializing in Power Query Formula Language (M)

Hi, it is not.

 

It is different approach to solve my question.

 

The question in this topic is how can I use your code for transformation column with null values?

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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
Top Kudoed Authors