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
Johan
Advocate II
Advocate II

PBI Destktop changes M script during upload csv from Azure Datalake

I have a file from azure datalake that is uploaded in PBI.

PBI automatically creates various scripts, li,ke:

 

let
Source = DataLake.Contents("adl://tenant.azuredatalakestore.net/Folder/File.csv"),
Navigation1 = Source{0}[Content],
in
Navigation1

 

However, when refreshing in PBI desktop, the script is transferred to:

 

let
Source = DataLake.Contents("adl://tenant.azuredatalakestore.net/Folder/File.csv"),
Navigation1 = Source{0}[Content],
#"Imported CSV" = Csv.Document(Navigation1,[Delimiter=":", Columns=19, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Changed Type" = Table.TransformColumnTypes(#"Imported CSV",{{"Column1", type text}, {"Column2", Int64.Type})
in
#"Changed Type"

 

And this is wrong, it should not change.

 

How to avoid this?

 

Thanks,

Johan

 

1 ACCEPTED SOLUTION
v-caliao-msft
Microsoft Employee
Microsoft Employee

@Johan,

 

 When connecting to a data srouce in Power BI Desktop, data type will be changed in Power Query automatically based on your data. If this data type is not what you want, you could change the data type in Power Query and check if this issue persists or not.

let
Source = DataLake.Contents("adl://tenant.azuredatalakestore.net/Folder/File.csv"),
Navigation1 = Source{0}[Content],
#"Imported CSV" = Csv.Document(Navigation1,[Delimiter=":", Columns=19, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Changed Type" = Table.TransformColumnTypes(#"Imported CSV",{{"Column1", type text}, {"Column2", Int64.Type})
in
#"Changed Type"

Regards,

Charlie Liao

View solution in original post

1 REPLY 1
v-caliao-msft
Microsoft Employee
Microsoft Employee

@Johan,

 

 When connecting to a data srouce in Power BI Desktop, data type will be changed in Power Query automatically based on your data. If this data type is not what you want, you could change the data type in Power Query and check if this issue persists or not.

let
Source = DataLake.Contents("adl://tenant.azuredatalakestore.net/Folder/File.csv"),
Navigation1 = Source{0}[Content],
#"Imported CSV" = Csv.Document(Navigation1,[Delimiter=":", Columns=19, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Changed Type" = Table.TransformColumnTypes(#"Imported CSV",{{"Column1", type text}, {"Column2", Int64.Type})
in
#"Changed Type"

Regards,

Charlie Liao

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