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
asebes
Frequent Visitor

Change MMM-YY Format to a Date Format

Seems like this should be easy but can't quite get it.  Have text in the following format that needs to be converted to a date format (last day of the month).  Thank you!

 

Current Format (MMM-YY)                     Desired Output

Dec-19                                                     12/31/19

Jan-20                                                      1/31/20

Feb-20                                                      2/28/20

1 ACCEPTED SOLUTION
DataZoe
Employee
Employee

@asebes and to add to @mahoneypat 's reponse, here is a DAX calculated column version:

 

EOM Date = EOMONTH("1-"&'Table'[Date Text],0)
 
DataZoe_0-1618534755769.png

 

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

View solution in original post

3 REPLIES 3
ac-pbi
Frequent Visitor

I wanted to do this in Power Query instead of DAX and creating a Custom Column with this formula worked for me (credit to ChatGPT for the assist):

 

=Date.FromText("01-"&[YourTextColumnHere])

acpbi_0-1682432857155.png

 

DataZoe
Employee
Employee

@asebes and to add to @mahoneypat 's reponse, here is a DAX calculated column version:

 

EOM Date = EOMONTH("1-"&'Table'[Date Text],0)
 
DataZoe_0-1618534755769.png

 

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

mahoneypat
Employee
Employee

You can add a custom column in the query editor with this formula to get your desired result.

 

= Date.EndOfMonth(Date.From([Current Format]))

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


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.