Search code examples
powerbidatasetrefreshpowerbi-desktop

Dataset with additional columns. These are not recognized when I update the data source. How to update the existing data source


PROBLEM

I have a pretty simple Set-Up:

  • Power BI Report
  • Data Source csv with 14 Columns

Now I received an update of the csv

  • with additional 5 columns
  • new columns are a attached "in the middle of the table" as column 2 to 6.
  • When I exchange the data file and refresh the data source Power BI does only load the Colums 1 to 14 and ignores the columns 15 to 19

enter image description here


WHAT I ALREADY TRIED:

  • Update Data --> Error message "Missing Columns"
  • Data transformation > Datasource settings > reselect dataset file --> Error message "Missing Columns"
  • Data transformation > Power Query Editor > Step "Source" > reselect dataset file --> Error message "Missing Columns"
  • Data transformation > Power Query Editor > Step "Source" > update Dax by changing the delimiter from 14 to 19 --> that did the job

= Csv.Document(File.Contents("C:...............\daten.csv"),[Delimiter=";", Columns=14, Encoding=1252, QuoteStyle=QuoteStyle.None])

to

= Csv.Document(File.Contents("C:...............\daten.csv"),[Delimiter=";", Columns=19, Encoding=1252, QuoteStyle=QuoteStyle.None])


Question

Is their any other more convenient way to update a dataset with addition rows?


Solution

  • Try this one-

    Change source

    Source = Csv.Document(File.Contents("C:...............\daten.csv"),[Delimiter=",", Columns=14, Encoding=1252, QuoteStyle=QuoteStyle.None]),

    Remove Columns parameter:

    Source = Csv.Document(File.Contents("C:...............\daten.csv"), [Delimiter=",", Encoding=1252, QuoteStyle=QuoteStyle.None])