The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
A power bi newbie here.
Say if I import a table A from a data source into power bi, some minor changes to the imported dataset. calculated columns, measures etc.
Now I add a new field in the table A, how do I include the new field into the data set in power bi (without re-creating a new one)?
Thanks in advance.
Solved! Go to Solution.
Thanks a lot !! Your work around saved my time a lot !!!
Glad it worked and saved time for you. It should really be a lot easier than that in my opinion within Power BI. Hopefully Microsoft will make the change in a future version.
I wish that trick worked for me. It's not though. I can't believe this is even an issue for users. It should not be so complicated to add columns and have them show up that you have to take risks breaking things to add a new bit of data. Boggles the mind how bad that is as a feature in the software. I might look elsewhere for my reporting solution. Did this issue reoccur for you each time and become a big pain over the years, as people ask for changes in the reporting and supply new bits of data? Or did you find a way to keep using PowerBI even though this is a pain? Was it worth the pain? Or would you recommend other more flexible solutions?
HI Terrence, I agree completely with you that it should not be this complicated for sure. This is actually my first attempt at creating and modifying my data but it's easy to tell that this will be a problem anytime you import data and need to add new columns. Hopefully in future patches and/or upgrades they'll simplify this process.
hi Terrence
what type of data source do you have?
I have CSV data files. But could save them into loads of other formats,. if that makes any difference...
mine are all CSV and the above two methods work 100% fine; if you cannot follow the steps, do you want me to do pics one by one.... that will cost me a bit of time, but I dont want you to be flummoxed; for CSV it works a charm
Beware - you will need a PRO license for every user who wants to view your data.
Thanks. That worked like a charm. Much appreciated.
Best,
Alex
To add to this thread, I have a sql data source and was having the same issue. I could go into "Edit Query" and refresh the data and the new column would appear in the preview. However when I clicked "Close & Apply" the list of fields in the panel on the right hand side for that data set would not change. It was very frustrating. I didn't want to delete and add the data source because I had already created a bunch of calculated fields that I didn't want to have to do all over again. I'm not sure whether the existence of these extra fields was what was causing the problem.
I decided to try and change the data source in some way to see if that helped. I went back into "Edit Query" and moved the new column into another position. This created a "Reordered Column" step on the query. When I clickec "Close & Apply" this time, the new column appeared in the fields list on the right hand panel. So that was my work around.
To add to this. I had a SQL data source. Going into "Edit Queries" and refreshing made the column appear in the preview. However after clicking "Close & Apply" and viewing the fields in the dataset in the right hand panel, the new column still wasn't appearing. I'm not sure if this had something to do with the fact that I had already added some calculated fields.
My solution was to go back into "Edit Queries" and simply move the column from the end to another position in the table. This created a "Reordered Columns" step. After closing and applying now, the new field appeared in the right hand panel. Hope this helps someone.
What about just changing columns quantity in M query?
I used advanced editor in Data Source:
let Source = Csv.Document(File.Contents("C:\Users\user\Desktop\AddressType.csv"),[Delimiter="|", Columns=5, Encoding=1200, QuoteStyle=QuoteStyle.None]), #"Change1" = Table.TransformColumnTypes(Origen,{{"Column1", Int64.Type}, {"Column2", type text}, {"Column3", type text}, {"Column4", type datetime}}) in #"Change1"
In the code (source line), instead of Columns=5, you just change to Coumns=6 and it adds the new column. It worked for me.
Thanks, this is by for the most simple solution. It also helps me to understand how to work with M query and the advanced editor, which is a big plus I you're new to this.
Rodion, Glad it worked for you too! 🙂
Thank you for this, @reneincer
I am new to Power BI, and it was driving me crazy that I had to make things all over again if I wanted to add data to my data source.
When you modify the Data Source as reneincer suggested, you will not find "Columns=X" in the code when working with an Excel file. I worked around that by simply going into the second line of the code and inserting my new column names in the code line. i.e. - add {"Column2.5", type text} after the "Column2" piece in the code.
Worked perfectly.
Thanks for the suggestion reneincer!
thanks reneincer
that worked amazingly well.... edit query then just 'up' the Columns= by one
perfect
This is such a good fix. Thank you.
Does this work for an Excel file as well?
Same issue. How do show the new column which I just created in the data source (Excel table, new column added but not shown in Power Bi desktop data field)? somehow I cant do those steps suggested above. thanks
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
78 | |
71 | |
52 | |
50 |
User | Count |
---|---|
123 | |
119 | |
76 | |
64 | |
60 |