cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dsandip59 Member
Member

How to create date from 201902 to 02/01/2019 using dax or power query?

Hi,

I have date column and the value of the column is : 201902 which is YYYYMM format. when I load the value in power bi, it shows that data type is shoowing as Text.

Now I have to create date from this and format should be MM/DD/YYYY.

 

Please suggest what to do now?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: How to create date from 201902 to 02/01/2019 using dax or power query?

Hi @dsandip59 

You can add custom column in query editor.

Please see the code below

=Date.FromText([YourColumn] & "01")

Regards,
Mariusz

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

2 REPLIES 2
Highlighted
cnweke Member
Member

Re: How to create date from 201902 to 02/01/2019 using dax or power query?

https://docs.microsoft.com/en-us/dax/datevalue-function-dax

 

The datevalue(DateColumn) should work here. It turns text based date into datetime values. 

Super User
Super User

Re: How to create date from 201902 to 02/01/2019 using dax or power query?

Hi @dsandip59 

You can add custom column in query editor.

Please see the code below

=Date.FromText([YourColumn] & "01")

Regards,
Mariusz

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

Helpful resources

Announcements
Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 6 members 2,524 guests
Please welcome our newest community members: