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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
wjey9f
Regular Visitor

Dynamic Data Source Refresh in Power BI Service

I am trying to schedule a refresh from a csv file located on a network drive that is updated daily with a date stamp at the beginning.  Below is the current dynamic input that allows me to refresh within Power BI Desktop but I am needing to schedule this on the server.  Is there any way to build this in a way that will allow for scheduling on Power BI Service? 

 

The file name is structured with yesterday's date in 'YYYYMMDD' format followed by '_P1.SURVEY_CONTACTS.csv'

 

= Csv.Document(File.Contents("O:\library\Surveys\Archive\"
& Number.ToText(Date.Year(DateTime.LocalNow()))
& Number.ToText(Date.Month(DateTime.LocalNow()), "D2")
& Number.ToText(Date.Day(Date.AddDays(Date.From(DateTime.LocalNow()), -1)), "D2")
& "_P1.SURVEY_CONTACTS.csv"),[Delimiter=",", Columns=24, Encoding=1252, QuoteStyle=QuoteStyle.None])

2 REPLIES 2
GilbertQ
Super User
Super User

Hi @wjey9f 

 

As far as I know it is not possible to use a dynamic data source because it will always first try and detect the file. When it is dynamic it cannot do that.


With that been said, what you could do is to rather browse the local folder which will be the same folder. Then dynamically you can filter the files for your file name as based above?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

This worked to set up the refresh schedule!  Thank you!

 

One part I forgot to mention is that I was hoping the refresh would fail if files with that specific date stamp were not in the folder.  That way I could get an email notification that there was no file available.  Any chance you know a workaround for this?

 

I appreciate all your help!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors