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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Manivannan
Helper I
Helper I

Time Zones

Hi,

 

I have created a measure to display "Time", i need AM/PM also to be displayed along with it.

How to achieve that?

 

Cap.PNG

 

Capture.PNG

 

Regards,

Manivannan M

 

1 ACCEPTED SOLUTION

Actually I have litlle knowledge of DAX, and even less of Direct Query, but if your formula works, then I guess this will work as well:

 

CurrentTime = "Time : " & IF(HOUR(NOW()) < 1,12,if(HOUR(NOW())>12,HOUR(NOW())-12,HOUR(NOW()))) & ":" & MINUTE(NOW()) & ":" & SECOND(NOW()) & IF(HOUR(NOW())<12," AM"," PM")
Specializing in Power Query Formula Language (M)

View solution in original post

8 REPLIES 8
Interkoubess
Solution Sage
Solution Sage

Hi @Manivannan,

 

How your data are stored?

 

In power query you can use this feature as below.

I hope it helps otherwise let us know with more examples..

Thx

Time_PP.PNG

Hi Interkoubess,

 

Thanks for the reply.

I used direct query.

 

 

Either =NOW() and format as hh:mm:ss tt

or = FORMAT(NOW(), "hh:mm:ss AM/PM")

 

By the way: this is more about time format than time zones, as the subject suggests.

Specializing in Power Query Formula Language (M)

Hi MarcelBeug,

 

Thanks for the reply. I used direct query for this, i guess FORMAT() will not work for direct query.

Is their any other way to achieve that?

 

 

 

 

@Manivannan,

 

By the way, to ensure that queries sent to the underlying data source have acceptable performance, limitations are imposed on measures by default. Advanced users can choose to bypass this limitation by selecting File > Options and settings > Options > DirectQuery, then selecting the option "Allow unrestricted measures in DirectQuery mode".

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

Actually I have litlle knowledge of DAX, and even less of Direct Query, but if your formula works, then I guess this will work as well:

 

CurrentTime = "Time : " & IF(HOUR(NOW()) < 1,12,if(HOUR(NOW())>12,HOUR(NOW())-12,HOUR(NOW()))) & ":" & MINUTE(NOW()) & ":" & SECOND(NOW()) & IF(HOUR(NOW())<12," AM"," PM")
Specializing in Power Query Formula Language (M)

Hi Marcel,

 

Thanks for the help. It worked for me.

@Manivannan,

 

Since your problem has been resolved, please help accept solution. Your contribution is highly appreciated.

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.