Reply
Regular Visitor
Posts: 21
Registered: ‎06-11-2016
Accepted Solution

Power Bi does not detect newly added columns to connected csv

Hi, 

 

I built a dashboard with a csv. Now i oppened the same CSV and pasted the new data (retained the existing header) along with new columns. Total rows = 201,032. I have spent lot of time and money on this dash (hiered a freealncer to do some DAX). How do i get PBI to pick up the new columns. 

 

NOTE: The data is being picked up when i do refersh just not the new column values. Please help


Accepted Solutions
Highlighted
Established Member
Posts: 208
Registered: ‎03-22-2016

Re: Power Bi does not detect newly added columns to connected csv

Hi @koshur. I created a csv with 3 columns, brought it into Power BI Desktop, added some columns in the Query Editor, and then added a column and measure with DAX. I went back to the source csv and added a new column, and when I refreshed I had the same issue - no new columns. But...

 

If you go to the Query Editor and click on the Source Applied Step, you should see something like this:

 

= Csv.Document(File.Contents("\\folder\subfolder\filename.csv"),[Delimiter=",", Columns=3, Encoding=1252, QuoteStyle=QuoteStyle.None])

 

The part that says Columns=3 is important. That's how many columns are being delimited, which will also limit how many columns can be brought in. In my example I had 3 columns, and then added 1. Once I changed the number to Columns=4, the new column came in, and worked with all of my other steps, DAX, etc. Change it to however many columns you're expecting to bring in now and you should be good!

View solution in original post


All Replies
Highlighted
Established Member
Posts: 208
Registered: ‎03-22-2016

Re: Power Bi does not detect newly added columns to connected csv

Hi @koshur. I created a csv with 3 columns, brought it into Power BI Desktop, added some columns in the Query Editor, and then added a column and measure with DAX. I went back to the source csv and added a new column, and when I refreshed I had the same issue - no new columns. But...

 

If you go to the Query Editor and click on the Source Applied Step, you should see something like this:

 

= Csv.Document(File.Contents("\\folder\subfolder\filename.csv"),[Delimiter=",", Columns=3, Encoding=1252, QuoteStyle=QuoteStyle.None])

 

The part that says Columns=3 is important. That's how many columns are being delimited, which will also limit how many columns can be brought in. In my example I had 3 columns, and then added 1. Once I changed the number to Columns=4, the new column came in, and worked with all of my other steps, DAX, etc. Change it to however many columns you're expecting to bring in now and you should be good!

Regular Visitor
Posts: 27
Registered: ‎12-02-2015

Re: Power Bi does not detect newly added columns to connected csv

[ Edited ]

Hi @koshur,

 

First within the .csv file if the data is within a table, make sure the newly added columns are apart of that same table.

 

If the format of the .csv file is clearly correct. You may need to change what columns are being pulled into Power BI via Power Query (the query editor).

 

To do this:

Under the Home Tab<Click Edit Queries< (This will take you to the query editor) on your right hand side there is "applied steps".

The first step is "Source" at this level you should see the option to import all columns.

 

You can also try within Query editor to click the "Choose Columns" and see if your new columns are showing up for import.

 

Lastly you can click "Advanded editor" and try to add that column's there or the number of columns  in M. The syntax should be repeatable as seen in the M code which has been applied to the other columns.

 

Let me know if any of these work for you.

Christian

Regular Visitor
Posts: 21
Registered: ‎06-11-2016

Re: Power Bi does not detect newly added columns to connected csv

thanks! this worked. Although something is not right with the calculations. the % calulations seem off. I've pinged the freelancer. 

Regular Visitor
Posts: 21
Registered: ‎06-11-2016

Re: Power Bi does not detect newly added columns to connected csv

Thanks Christian!! Columns=9 did the trick from me. I'm excited to see how active the forum is.. Smiley Happy

Frequent Visitor
Posts: 11
Registered: ‎08-13-2018

Re: Power Bi does not detect newly added columns to connected csv

I just wanted to thank you, I was lloking for this and was getting very complicated instructions from other posts but yours is simple and worked perfectly