cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
eduardormaia Frequent Visitor
Frequent Visitor

M Language - Transforming Data format

Dear Masters of M Language,

 

Need help to work with data formats in M Language.

 

I have a column with the format dd/mm/yyyy  hh:mm:ss I need to replicate this column containing only dd/mm/yyyy.

 

I'm sure it's very simple, please help.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
EtienneOL Member
Member

Re: M Language - Transforming Data format

Hi @eduardormaia ,

PowerBI does not directly identify a date from a format dd/mm/yyyy hh:mm:ss but if you first convert your text to date/time it will work.

 

How to do this : 

1. On top of your culumn you can chose data type for your column. Click there and choose Date/Time.

image.png

image.png

Repeath this step but chose "Date" this time.

Dont replace current change but add a new step (screenshot below)

image.png

Tell me if this worked as desired ! 

Regards, 

Etienne

View solution in original post

2 REPLIES 2
Highlighted
EtienneOL Member
Member

Re: M Language - Transforming Data format

Hi @eduardormaia ,

PowerBI does not directly identify a date from a format dd/mm/yyyy hh:mm:ss but if you first convert your text to date/time it will work.

 

How to do this : 

1. On top of your culumn you can chose data type for your column. Click there and choose Date/Time.

image.png

image.png

Repeath this step but chose "Date" this time.

Dont replace current change but add a new step (screenshot below)

image.png

Tell me if this worked as desired ! 

Regards, 

Etienne

View solution in original post

eduardormaia Frequent Visitor
Frequent Visitor

Re: M Language - Transforming Data format

Thanks! It worked just fine.

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

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: 302 members 3,426 guests
Please welcome our newest community members: