Forum Discussion
Add an extra field from a data source
- 10 years agoAnonymous
If I didn't misunderstood you, when you refresh in power bi desktop your new added column will automatically be imported.
Refreshing columns that are already there is no problem. Getting the new columns included is though.
I had the same issue. My source is a URL that returns a CSV. When the owner of the URL (a vendor) adds a new column to the CSV, PowerBI does NOT detect the new column.
I have gone into Edit queries -> Refresh Preview.
I can copy / paste the URL from the "Source" of the query into a browser and the CSV that returns has the new column.
However, looking in PowerBI...even clicking on the "Source" in the "Applied Steps" so that NOTHING has been done with the source data - no columns hidden, etc - the new column is NOT there.
If I change the URL to nonsense, save, then re-paste the URL into the source it will then find the new columns. A clumsy forced refresh. Should be a better way.
- elsalvador18210 years agoAdvocate IV
I have this issue also and it is very frustrating. We add addional columns and fields to source csvs all the time.
I have a work around that used to work...until today.
This way you will not lose any of your steps, which is very important especially if you have a complicated report that could break.
The work around is this:
1) refresh everything, make sure the new column is in the source csv
2) under applied steps in query editor, go to source and hit the settings gear icon to right of "source"
3) Choose Open file as "Automatic" hit OK
4) Your table will dissappear, double click the csv file icon, hit "insert" when the insert step box pops up
5) Your newly added column will appear at step 1 "source"
6) to make sure it stays , under "choose columns" or if you have a "removed columns" ...make sure the check box for that new column is checked
7) Your column is good to go now
This usually works. Except today it started giving me a wierd error after applying query edits Which is why I am here searching.
EDIT* I fixed my error. I was being dumb. My work around works again.
- reneincer9 years agoAdvocate II
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.
- LouisT9 years agoRegular Visitor
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!
- terencedottech9 years agoRegular Visitor
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?
- dan_hoff9 years agoHelper I
hi Terrence
what type of data source do you have?
- Sailor22549 years agoRegular Visitor
Does this work for an Excel file as well?
- Pandreoni8 years agoFrequent Visitor
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
- Anonymous6 years agoNot applicable
I want to add a new column to power bi from a data Cube without changing anything in the data cube.Is it possible to add new column to power Bi without modifiying in Data Cube.
Please let me know...