Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
fyrworx
Frequent Visitor

Data type format in Query editor

Hi,

 

I know that we can change the format of the data type in under the modelling tab in power bi.

 

I was wondering if we could change the format in the query editor. This will save me a lot of time.

 

This is the example:

= Table.TransformColumnTypes(#"Removed Columns2",{{"TnA_Start Time", type time}, {"TnA_Start Break", type time}, {"TnA_Stop Break", type time}, {"TnA_End Time", type time}})

 

I am able to get the time with the the format HH: MM: SS AM/PM but I want to be able to format it so that it just shows HH:MM?

 

Is this possible and how do I put it in the DAX query?

 

Thank you!

1 ACCEPTED SOLUTION
MattAllington
Community Champion
Community Champion

There is the number format and the display format. The query editor only sets the number format. Display formatting is immature in Power bi. You could potentially use a text pattern representing HHMM if you wanted 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

View solution in original post

2 REPLIES 2
MattAllington
Community Champion
Community Champion

There is the number format and the display format. The query editor only sets the number format. Display formatting is immature in Power bi. You could potentially use a text pattern representing HHMM if you wanted 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Thanks, that is exactly what I need though!

 

It would help so much in terms of creating models based on previous work.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.