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
p_tmb
New Member

format dd/mm/yy hh:mm:ss timestamp

hi, I'm working with a database containing dates in the format dd/mm/yy hh:mm:ss. I'd like to roll up these data to show months, weeks, and days. When I use the field though, powerbi perceives it as a discrete field. what should I do to format it as date and be able to establish a hyerarchy and drill up and down? 

p_tmb_0-1643186170368.png

 

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi @p_tmb ,

I created a sample pbix file(see attachment), please check whether that is what you want.

1. Split the column "Data" by delimiter space in Power Query Editor

yingyinr_0-1643699762088.png

2. Change the data type of column as "Date/Time

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

@p_tmb , as the data is in Aus/Ind/UK format, you need to change the system setting to get it correct

https://community.powerbi.com/t5/Desktop/How-to-apply-UK-date-format-dd-mm-yyyy-in-Date-slicer/td-p/...

 

You can convert to date like

DD/MM/YYYY to MM/DD/YYYY
date(year( mid(DD__MM__YY[date]7,,4)), month(mid(DD__MM__YY[date],4,2)) ,day(left(DD__MM__YY[date],2)))

 

check the power query option

Power Query - Text.Start, Text.Middle, Text.End: https://www.youtube.com/watch?v=vky4wPqm0O0

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.