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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
acanepa
Resolver I
Resolver I

OneDrive Dynamic Link

Hello All,

 

I have a csv file coming directly from OneDrive, where the file have the date in the name, so it generates a new file every day. The logic is very ismilar to this:

 

Companyname_20170221.csv

 

I made a calculation in PowerQuery language for capture the change in the day, taking the file from OneDrive. 

 

The Problem is that OneDrive refresh didn´t work with this type of file in PowerBI cloud, it works well in PowerBI desktop, but I want to fully automate the process.

 

The PowerQuery code is like this

 

let
 V =  if Date.Month(DateTime.LocalNow()) <10 then Text.Combine({"0", Number.ToText(Date.Month(DateTime.LocalNow())),Number.ToText(Date.Day(DateTime.LocalNow()))},"") else Number.ToText(Date.Month(DateTime.LocalNow())),    
Source = Csv.Document(Web.Contents("Private URL/Companyname" & V & ".csv"),[Delimiter=",", Columns=31, Encoding=1252, QuoteStyle=QuoteStyle.None])

The error I get from PowerBI cloud is

 

Error del origen de datos:Unable to refresh the model (id=1708304) because it references an unsupported data source.

 

There is a workaround in this subject?.

 

Thanks in advance.

 

Regards,

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @acanepa,

 

Power bi seems not support your method, I'd like suggest you use a static value to connect, you only need to replace the source file to get the newest data.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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