cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Re: Add an extra field from a data source

This is such a good fix.  Thank you.

Highlighted
Advocate II
Advocate II

Re: Add an extra field from a data source

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.

 

 

 

 

 

Highlighted
Helper I
Helper I

Re: Add an extra field from a data source

thanks reneincer

 

that worked amazingly well....  edit query then just 'up' the Columns= by one

 

perfect

 

 

Highlighted
Advocate II
Advocate II

Re: Add an extra field from a data source

My data source was a SQL. Same solution. Go the Source Cog and REFRESH PREVIEW on the toolbar. The new columns will appear. Thank God because my build has over one hundred relationship tables.
Highlighted
Regular Visitor

Re: Add an extra field from a 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!

Highlighted
New Member

Re: Add an extra field from a data source

Thanks. That worked like a charm. Much appreciated.

Best,

Alex

Highlighted
Regular Visitor

Re: Add an extra field from a data source

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?

Highlighted
Helper I
Helper I

Re: Add an extra field from a data source

hi Terrence

 

what type of data source do you have?

Highlighted
Regular Visitor

Re: Add an extra field from a data source

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.

Highlighted
Regular Visitor

Re: Add an extra field from a data source

I have CSV data files. But could save them into loads of other formats,. if that makes any difference... 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors