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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

M Type source load from datalake converting date to US format when it can and rest to UK format

Power BI data source from datalake 

eg expression below

ckdev_0-1726184603795.png

The data source date are in the uk format dd/MM/yyyy
When I process the cube for some reason it will convert the dates to US format if it can and leave the rest to UK format.
So we end up with mixed date formats in the cube. Which is incorrect.
Image below to demostrate.
2nd and 5th row it was swapped to MM/dd/yyyy while the 3rd row is dd/MM/yyyy. 
Column one is the original date in text so we can compare while column two is the processed date. 

ckdev_1-1726185166329.png

But when we get data from sql server this issue doesnt occur. Image the correct behaviour getting from sql server. 

ckdev_2-1726185392159.png

 

So concluding this is the issue with the DeltaLake.Table(TableSource) function in m type. Anyone else having this issue ? 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,
According to your description, there is mixed formatting when using M code to get the table from DataLake. The first thing we need to make clear is that the final data retrieved in the power query should be in the same format for each column, so your “mixed columns” are all recognized as US format, if you want them all to be in UK format, you can do a format conversion in m code

Source:{
"Type": "m",
"expression": [
	"let",
	"	Source = AzureStorage.DataLake(...)",
	"	TTableSource" = Source{...}",
	"	ToDelta" = DaltaLake.Table(),
	"	ConvertedDates = Table.TransformColumns(ToDelta, {{"DateColumn", each Date.FromText(_, "en-GB"), type date}})",
	"in",
	"	ConvertedDates"
	]
}

 

Best regards,
Albert He


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

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,
According to your description, there is mixed formatting when using M code to get the table from DataLake. The first thing we need to make clear is that the final data retrieved in the power query should be in the same format for each column, so your “mixed columns” are all recognized as US format, if you want them all to be in UK format, you can do a format conversion in m code

Source:{
"Type": "m",
"expression": [
	"let",
	"	Source = AzureStorage.DataLake(...)",
	"	TTableSource" = Source{...}",
	"	ToDelta" = DaltaLake.Table(),
	"	ConvertedDates = Table.TransformColumns(ToDelta, {{"DateColumn", each Date.FromText(_, "en-GB"), type date}})",
	"in",
	"	ConvertedDates"
	]
}

 

Best regards,
Albert He


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

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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