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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
jaryszek
Impactful Individual
Impactful Individual

Make relative path in power query M language

Hi Guys,

 

i want to make refreshable dynammic data source which is in my case WebContents with CSV document.

let
    FilePath = SourceTablesDTT[Connector]{List.PositionOf(SourceTablesDTT[TableName],"Deployments")},
    Source = Csv.Document(Web.Contents(FilePath),[Delimiter=",", Columns=10, Encoding=1250, QuoteStyle=QuoteStyle.None]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type text}, {"Column3", type text}, {"Column4", type text}, {"Column5", type text}, {"Column6", type text}, {"Column7", type text}, {"Column8", type text}, {"Column9", type text}, {"Column10", type text}})
in
    #"Changed Type"

 
I tried to use FilePath to workaround it but still data source is not visible.

jaryszek_0-1657016198812.png


How to make from this relative path to be able to refresh whole datasaet in power BI Service?

Best,
Jacek

 

 

4 REPLIES 4
jaryszek
Impactful Individual
Impactful Individual

Anyone?

Jacek

jaryszek
Impactful Individual
Impactful Individual

Ok, 

so generally i want to make from this path:
"https://local-node.xxx.com:9999/v1/bundles/Excel/data/xxx:deployment/1.0.0/Deployments/Deployments" which is an absoluthe path - http query string (relative path)?

Best,
Jacek

Anonymous
Not applicable

Hi @jaryszek ,

Are you trying to link to a particular CSV file? What is that file stored in? You can refer to the links below to link to a CSV file in Power BI Desktop.

Import CSV file to Power BI

let
    Source = Csv.Document(File.Contents("xxxx.csv"),[Delimiter=",", Columns=3, Encoding=1252, QuoteStyle=QuoteStyle.None]),
    #"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"ID", Int64.Type}, {"Sales", Int64.Type}, {" Category", type text}})
in
    #"Changed Type"

Create a Dynamic File Path in Power Query

yingyinr_0-1657251800295.png

Best Regards

jaryszek
Impactful Individual
Impactful Individual

@Anonymous thank you.

The main source is web contents and trying to make this as dynamic data source. 
What i have read power bi service will not refresh this kind od data because of absoluth path instead of relative path...

Best,
Jacek

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