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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
randyrettig
Helper I
Helper I

Column Change

I have a folder of .json files that I've loaded and have been using to run several reports.  All of these files have the exact same structure.  Recently, the name of the one of the columns has been changed, so all of the new .json files for the last few days have the column with the new name, and all of the files prior to that have the column with the old name. 

 

BI is not loading the column with the old name, or the new name now.  It's loading the rest of the file, but just completely ignoring that column.  Is there a way to fix this?  

1 ACCEPTED SOLUTION
v-jianpeng-msft
Community Support
Community Support

Hi, @randyrettig 

Based on your description, I created the following two Json data files:

vjianpengmsft_1-1722390551617.png

vjianpengmsft_2-1722390573906.png

Use these two files in Power BI:

vjianpengmsft_3-1722390872237.png

vjianpengmsft_4-1722390891158.png

When we make changes to the column names in the json1 file:

vjianpengmsft_5-1722390961173.png

When we refreshed in Power BI, we viewed that the data for the old original column names were not loaded.

vjianpengmsft_6-1722390990585.png

The main reason for this problem is that when we use a json file as a data source, PowerQuery automatically converts this json file to table for us, and these converted M codes do not change automatically, as you can see in the image below:

vjianpengmsft_7-1722391232931.png

 

The current solution is:
1. Update your report's M code so that your report's M code contains your new column names.
2. Use other tools to convert your json file data into something like an Excel file, or store them in a database so that when you change the column names, you only need to change them in Power BI Desktop.
Here in SQL Server database as an example, I am using the following sample table:

vjianpengmsft_8-1722391700516.png

vjianpengmsft_9-1722391715824.png

When I change the listing:

vjianpengmsft_10-1722391759749.png

I just need to refresh my PowerBI report and the new column names are automatically applied.

vjianpengmsft_11-1722391813205.png

vjianpengmsft_12-1722391828762.png

 

 

Best Regards

Jianpeng Li

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

View solution in original post

3 REPLIES 3
v-jianpeng-msft
Community Support
Community Support

Hi, @randyrettig 

Based on your description, I created the following two Json data files:

vjianpengmsft_1-1722390551617.png

vjianpengmsft_2-1722390573906.png

Use these two files in Power BI:

vjianpengmsft_3-1722390872237.png

vjianpengmsft_4-1722390891158.png

When we make changes to the column names in the json1 file:

vjianpengmsft_5-1722390961173.png

When we refreshed in Power BI, we viewed that the data for the old original column names were not loaded.

vjianpengmsft_6-1722390990585.png

The main reason for this problem is that when we use a json file as a data source, PowerQuery automatically converts this json file to table for us, and these converted M codes do not change automatically, as you can see in the image below:

vjianpengmsft_7-1722391232931.png

 

The current solution is:
1. Update your report's M code so that your report's M code contains your new column names.
2. Use other tools to convert your json file data into something like an Excel file, or store them in a database so that when you change the column names, you only need to change them in Power BI Desktop.
Here in SQL Server database as an example, I am using the following sample table:

vjianpengmsft_8-1722391700516.png

vjianpengmsft_9-1722391715824.png

When I change the listing:

vjianpengmsft_10-1722391759749.png

I just need to refresh my PowerBI report and the new column names are automatically applied.

vjianpengmsft_11-1722391813205.png

vjianpengmsft_12-1722391828762.png

 

 

Best Regards

Jianpeng Li

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

v-jianpeng-msft
Community Support
Community Support

Hi, @randyrettig 

Based on your description, I created the following two Json data files:

vjianpengmsft_1-1722390551617.png

vjianpengmsft_2-1722390573906.png

Use these two files in Power BI:

vjianpengmsft_3-1722390872237.png

vjianpengmsft_4-1722390891158.png

When we make changes to the column names in the json1 file:

vjianpengmsft_5-1722390961173.png

When we refreshed in Power BI, we viewed that the data for the old original column names were not loaded.

vjianpengmsft_6-1722390990585.png

The main reason for this problem is that when we use a json file as a data source, PowerQuery automatically converts this json file to table for us, and these converted M codes do not change automatically, as you can see in the image below:

vjianpengmsft_7-1722391232931.png

 

The current solution is:
1. Update your report's M code so that your report's M code contains your new column names.
2. Use other tools to convert your json file data into something like an Excel file, or store them in a database so that when you change the column names, you only need to change them in Power BI Desktop.
Here in SQL Server database as an example, I am using the following sample table:

vjianpengmsft_8-1722391700516.png

vjianpengmsft_9-1722391715824.png

When I change the listing:

vjianpengmsft_10-1722391759749.png

I just need to refresh my PowerBI report and the new column names are automatically applied.

vjianpengmsft_11-1722391813205.png

vjianpengmsft_12-1722391828762.png

 

 

Best Regards

Jianpeng Li

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

Thank you!

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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