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

Power Bi recognizing changing date for a file daily

Hi,

I have a csv that automatically updates itself daily with new data. The problem is in the code that was written it changes the name of the csv to the most current date. Is there a way I can get power bi to recognize and accept that it is the same file with just a different name so that it will update itself each day?

 

Thanks,

Dan

1 ACCEPTED SOLUTION

Hi @drivas771994 ,

 

You need to connect a folder, please refer the following steps.

 

1. Create a folder to put your file.

 

P1.jpg

 

2. Then open Power BI Desktop, select Get date -> folder to connect the folder you create. You need to select Combine and Transform data.

 

P2.jpg

 

3. We need to remove the first column.

 

P3.jpg

 

4. Now it will be updated according to the changes in your data.

We change the file name and click the refresh,

 

P4.jpg

 

P5.jpg

 

If you have any question, please kindly ask here and we will try to resolve it.

 

Best regards,

 

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
Advocate I
Advocate I

Considering your file name = FileNamemmddyyy.csv

Rather connecting directly to file use below steps

1. Select Folder as source
2. Aplly filter on file name - Begin with "FileName"
3. Click on Binary to extract the data

Ok. So how would I get power bi to recognize when I try to refresh it. The problem is that I have to change the source settings daily to get it to look at the renamed file since it isn't recognizing it with the new name. I've used to folder source app since it though that would bypass it.

 

Example: 

Original File: Data10-10

Next Day: Data10-11

2nd Day After: Data10-12

 

Power Bi is giving me the error that it can't find the file "Data10-10" since it's not the same name the next day.

Hi,

If you select folder as a source then the file name should not matter.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

This is doable.  Use a Folder connector so you see all the files in your query, then sort by one of the columns (modified date, your filename, or values you extract from the filename), so the most recent file is on top.  Then you can just keep the top row, and expand the column with your Data (or you can reference the top row data column by inserting a step and using this syntax for the previous step

 

= #"Previous Step"{0}[Data]

 

That will get the first row of the Data column (rename if needed) from the table in the Previous Step (rename that to whatever that is called, like #"Changed Type", etc.

 

Regards,

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


drivas771994_0-1602479003422.png

So I did that method and then just changed the name of the file to 10-9 to test it and got this error still. It seems to make sense but power bi keeps creating a specific file path in my steps with the file name of 10-10. Can I get it to ignore the file name?

I wanted to follow up and see if anyone can solve this

Hi @drivas771994 ,

 

How about the result after you follow the suggestions mentioned in my original post?

Could you please provide more details or expected result about it If it doesn't meet your requirement?

If you've fixed the issue on your own please kindly share your solution. If the above posts help, please kindly mark it as a solution to help others find it more quickly.

 

Best regards,

 

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @drivas771994 ,

 

You need to connect a folder, please refer the following steps.

 

1. Create a folder to put your file.

 

P1.jpg

 

2. Then open Power BI Desktop, select Get date -> folder to connect the folder you create. You need to select Combine and Transform data.

 

P2.jpg

 

3. We need to remove the first column.

 

P3.jpg

 

4. Now it will be updated according to the changes in your data.

We change the file name and click the refresh,

 

P4.jpg

 

P5.jpg

 

If you have any question, please kindly ask here and we will try to resolve it.

 

Best regards,

 

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

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