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
GlobalFever
Advocate II
Advocate II

Time cannot be set to 24 hour format in Continuous X Axis

Hi,

 

I've got a column which is in "Time" data type.

It is used as X-axis in an Area Chart, continous.

What I've found is that in Desktop it is showing as 24 hour format whereas it will be showing AM/PM no matter how I configure the format in column tool. 

Actually the format function only works when I set this axis as categorical.

Could you please help me out? 

 

Screenshots in desktop:

Untitled.png

The "Hour" column is set as h:nn in desktop:

Untitled1.png

 

Still showing AM/PM in the portal:

Untitled2.png

 

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @GlobalFever ,

 

If it is not a table visual, it will indeed automatically become the twelve hour format.

2.png

 

Here's the workaround, you can turn the time field to text.

24hr = FORMAT([Time],"HH:mm:ss")

Then you need to sort the 24hr column by the time column.

vstephenmsft_5-1642757380950.png

Now you can get the time in 24-hour format.

vstephenmsft_6-1642757430780.png

 

Best Regards,

Stephen Tao

 

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

3 REPLIES 3
v-stephen-msft
Community Support
Community Support

Hi @GlobalFever ,

 

If it is not a table visual, it will indeed automatically become the twelve hour format.

2.png

 

Here's the workaround, you can turn the time field to text.

24hr = FORMAT([Time],"HH:mm:ss")

Then you need to sort the 24hr column by the time column.

vstephenmsft_5-1642757380950.png

Now you can get the time in 24-hour format.

vstephenmsft_6-1642757430780.png

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi Stephen,

 

Thanks for replying.

 

Yes by using text format time value, we can show them in 12h or 24h as we want.

But in this case the time value will be categorically,

which means the X axis must be showing every hour point, and the X axis gridlines will be lost.

 

Untitled.png

lbendlin
Super User
Super User

Is the locale of your browser set to en-us?

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.