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

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.

Reply
Anonymous
Not applicable

Files With Different Columns Changing to Null (Transform Function)

Hi Everyone,

 

I'm currently referencing this video: Combine Files With Slightly Different Columns (Power BI & Excel). I've successfuly implemented the solution of updating the transform function code to include all needed column headers. However, now my data is changing to NULL...

 

Any and all suggestions are helpful! 

 

Please see the below for original data vs. outcome image. 

 

If not... please explainWas any equipment Red Tagged for Repair?
N/Ablank
N/AYes
Needs possible software reset Yes

 

The sample data is transformed through the combination/transformation of multiple excel files. The actions to modify the below transform function are due to one column being excluded upon combining the files. The "Columns" list inserted into the function below adds the necessary headers and is working as intended albeit the NULL issue. 

 

listofcolumns.PNG

 

Thank you,

 

PBInJelly

1 ACCEPTED SOLUTION
Anonymous
Not applicable

You have to make sure that, before you combine all of the tables, that the table with the most columns is at the top. You can use Table.ColumnCount to add a column with the number of columns from each unexpanded table. Add an index column first so as not to lose your original sort order. Now, as long as your first table has column names and values, you will eliminate null columns.

 

--Nate

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous ,

 

What's your sample data? Perhaps you can follow the description of this article to check whether your steps are correct step by step.

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

You have to make sure that, before you combine all of the tables, that the table with the most columns is at the top. You can use Table.ColumnCount to add a column with the number of columns from each unexpanded table. Add an index column first so as not to lose your original sort order. Now, as long as your first table has column names and values, you will eliminate null columns.

 

--Nate

Greg_Deckler
Community Champion
Community Champion

@Anonymous Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Greg, I updated the post accordingly. Hopefully this is helpful for you... 

 

Thanks, 

 

PBInJelly

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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