cancel
Showing results for 
Search instead for 
Did you mean: 
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 Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Power BI Dev Camp Session 22 768x460.jpg

Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!