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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ryanb11
Helper III
Helper III

convert datetime field to MMM-YYYY format not showing correctly in visuals

I want to convert a datetime field into MMM-YYYY format, which looks to work when using:

 

YearMonth = FORMAT('Journey'[Completion-Time], "MMM-YYYY")
 
But when applying the YearMonth column to visuals on a chart the axis shows the datetime values, even though in the query editor the dates look to be in MMM-YYYY format.
 
How can I correct this so the charts show the YearMonth in "MMM-YYYY" and not datetime format.
 
In the query editor for Completion-Time I have tried selecting the data type as text, date, datetime but still the same issue.
 
Sample data below 
Completion-TimeYearMonth
15/07/2020 15:16:16July 2020
20/08/2020 17:16:08August 2020
 
5 REPLIES 5
Anonymous
Not applicable

Hi @ryanb11 ,

According to my understanding, you want to format datetime with “Month-Year” , right?

For my test,once Format() is used, the type of the data will become String,  so just make sure the data type is Text like this:

8.28.fo.1.PNG

 

Did I answer your question ? Please mark my reply as solution. Thank you very much.

If not, please upload some insensitive data samples and expected output.

 

Best Regards,

Eyelyn Qin

amitchandak
Super User
Super User

@ryanb11 ,

I doubt this column can come has date-time, unless data type is changed.

YearMonth = FORMAT('Journey'[Completion-Time], "MMM-YYYY")

 

Sorting can be an issue , you can sort on the column

YearMonth Sort= FORMAT('Journey'[Completion-Time], "YYYYMM")

 

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Create a new calculated column in report view and use the following formula:

 

MMMYY = FORMAT([Date],"MMM-YY")
 
Ensure you switch out "Date" for the name of your Date column. 

I tried that but it didnt work, the dates in the visual are still showing as datetime

any other ideas? @Anonymous 

Anonymous
Not applicable

HI @ryanb11 

Consider converting the column to date before using the below formula.

FORMAT(table[date],"MMM-YYYY")

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors