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
Anonymous
Not applicable

Transform date to YYYY-MM

Hi,

 

I'm just starting wiht PowerBI desktop.

 

My request :

-I have an excel file including a Date

-I load it in PBI GOOD.

-I want to create a field 'month date'

 

I'm triing infor shared on https://community.powerbi.com/t5/Desktop/Transform-date-to-MM-YYYY/m-p/205311#M90409

but it failed each time : FORMAT function unknown.

 

additionnal info : my power BI is in French, I cannot find a way to change to english. could be the issue.

 

 

1 ACCEPTED SOLUTION
v-xjiin-msft
Solution Sage
Solution Sage

Hi @Anonymous,

 

One more thing you should be noticed that, when you use FORMAT() function to transform the date. It will be a text type value not a date any more.

 

So if you still want to keep it as date. You can try the build in "MMMM yyyy" date format. Choose your date column, go to Modeling and you can find this date format at Format option.

 

 4.PNG

 

Thanks,
Xi Jin.

View solution in original post

2 REPLIES 2
v-xjiin-msft
Solution Sage
Solution Sage

Hi @Anonymous,

 

One more thing you should be noticed that, when you use FORMAT() function to transform the date. It will be a text type value not a date any more.

 

So if you still want to keep it as date. You can try the build in "MMMM yyyy" date format. Choose your date column, go to Modeling and you can find this date format at Format option.

 

 4.PNG

 

Thanks,
Xi Jin.

Floriankx
Solution Sage
Solution Sage

The link you shared is for PowerQuery not PowerBI.

 

Dax should be: =FORMAT(DateColumn;"YYYY-MM")

 

Best regards.

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.