Forum Discussion
Column Change
- Anonymous2 years ago
Hi, randyrettig
Based on your description, I created the following two Json data files:
Use these two files in Power BI:
When we make changes to the column names in the json1 file:
When we refreshed in Power BI, we viewed that the data for the old original column names were not loaded.
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:
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:When I change the listing:
I just need to refresh my PowerBI report and the new column names are automatically applied.
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.
Hi, randyrettig
Based on your description, I created the following two Json data files:
Use these two files in Power BI:
When we make changes to the column names in the json1 file:
When we refreshed in Power BI, we viewed that the data for the old original column names were not loaded.
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:
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:
When I change the listing:
I just need to refresh my PowerBI report and the new column names are automatically applied.
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.
- randyrettig2 years agoHelper I
Thank you!