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
ilcaa72
Helper IV
Helper IV

power query, Date Type

i opened a table in power Query, the column is date data and comes in as a number field...

 

201805

201804

201803

 

when i convert to date it changes it to, 7/8/2452. Obviously wrong.  What is the best practice to have PQ recognize this as a Date (year month) , what conversions, etc should i perform. thanks

 

in PQ, i seperated the text field into 2 separate columns, then rejoined them with a "/" between the 2 parts.  I then converted to Date (it works). I then deleted the 2 seperated columns.

 

I was wondering if there is a more efficient way to do this in PQ

1 ACCEPTED SOLUTION
Anonymous
Not applicable

 

 

In reports tab use DAX: create a new column Date = FORMAT(Table1[Column1],"YYYY-MM")

View solution in original post

3 REPLIES 3
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @ilcaa72,

 

Have you solved your problem?

 

If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @ilcaa72,

 

You could have a reference of this similar thread which use M query to convert YYYYMM to date type.

 

There are two solutions in that thread, you could choose one the more efficient.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

 

 

In reports tab use DAX: create a new column Date = FORMAT(Table1[Column1],"YYYY-MM")

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.

Top Solution Authors