cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pbuser Member
Member

Add an extra field from a data source

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Add an extra field from a data source

@pbuser

If I didn't misunderstood you, when you refresh in power bi desktop your new added column will automatically be imported.
38 REPLIES 38
Super User
Super User

Re: Add an extra field from a data source

@pbuser

If I didn't misunderstood you, when you refresh in power bi desktop your new added column will automatically be imported.
mathysbt Frequent Visitor
Frequent Visitor

Re: Add an extra field from a data source

Hi,

 

I expected the functionality to work as you explained, but it doesn't for me.

 

I am using a local file. It is an Excel spreadsheet with a table. The table has 4 columns. If I add a fifth column with data, I would expect the field to show up in Power BI after a refresh. I click refresh for the datasource and it refreshes successfully. Then, I go to report and the new field does not show up. The only way to get the new field is to delete the old datasource and add a new one.

 

Thoughts?

carinat Regular Visitor
Regular Visitor

Re: Add an extra field from a data source

I have the same problem: If I add a column to my original data source in Excel and refresh in Power BI, my new column doesn't show up. Is it possible to get the new column or is the only way to start from scratch? (I'd rather not since I've build relationships to other sources, added calculated columns, etc.)

SabineOussi Established Member
Established Member

Re: Add an extra field from a data source

Make sure you have saved your spreadsheet before refreshing in Power BI.

carinat Regular Visitor
Regular Visitor

Re: Add an extra field from a data source

Refreshing columns that are already there is no problem. Getting the new columns included is though.

frandsb Frequent Visitor
Frequent Visitor

Re: Add an extra field from a data source

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.

elsalvador182 Regular Visitor
Regular Visitor

Re: Add an extra field from a data source

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.

electrobrit Member
Member

Re: Add an extra field from a data source

 @elsalvador182 Thank you for that. I actually couldn't do exactly what you said because my csv file is updated from Sharepoint but the premise helped. When I inserted the step to import CSV, it inserted the whole document with the last column which had fallen off due to the new column being added. Then I could delete the old "import CSV step" and my steps all worked from there on to the end.

 

It was driving me crazy so thank you for taking the time to add your solution to help someone who needed it...ME!

Sailor2254 Frequent Visitor
Frequent Visitor

Re: Add an extra field from a data source

Does this work for an Excel file as well?