Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
KasperJ90
Helper III
Helper III

How to add columns to daily CSV files loaded from SharePoint folder

Hi,

 

I have a daily CSV file created with a table from my dataset and located in SharePoint.

I have then connected Power BI to this SharePoint folder and it works.
The problem I have is that sometimes I need to add an additional column to the table I am saving. Here Power BI does not regonize this column since it only shows the columns available in the first created CSV file.

 

Example:

Day1, columns = 5

Day2, columns = 5

Day3, columns = 6

Day4, columns = 7

 

In Power BI I have my table, but also this "Helper Queries":

KasperJ90_0-1672943840728.png

I want to add column 6+7 in my table in Power BI. How can I do this? 

 

2 REPLIES 2
Mikelytics
Resident Rockstar
Resident Rockstar

Hi @KasperJ90 

 

In your Source step definition you have to delete the "Columns" Property. Pleas go in the code of the function and delete the followig string which I highlighted in my example.

Mikelytics_1-1672944768610.png

 

 

Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your thumbs up!
@ me in replies or I'll lose your thread.

 

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

Hi @Mikelytics 

 

Thanks - however I still have the issue. I think the problem are both the added column(s) (possible solved with deleting the columns= code above), but also the sequence of the columns. In my CSV file with my table from day4 I have 7 columns, but two of these are measures. I see in the CSV file, that these measures always are the latest columns in my CSV files. So when I add a new column (it is not a measure) it is located as column 5 and not column 7. This means the CSV file from day4 will have a different sortment and not work.

 

Can I use the latest CSV file as "sample file" instead of the first file in my SharePoint folder?

Day1, columns = 5 

Day2, columns = 5

Day3, columns = 6

Day4, columns = 7

 

 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.