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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
SamanthBha
Regular Visitor

Custom time Format in pbi

 

 Actually i am having the below data in excel i will use customise format ([hh]:mm) same i have to get in Power bi, 

 

Can Anyone help me in this.

Time Open to Close ([hh]:mm:ss)
946:10:49
600:04:48
442:55:08
722:22:20
20:41:32
9:01:53
140:58:06
118:36:09
8:44:25
31:30:58
52:00:51
270:53:48
245:43:07
101:12:45
220:32:09
52:54:53
55:48:38
4:11:58
29:43:21
221:48:47
142:39:02
79:02:06
130:05:01
121:14:20
129:10:54
4:29:35
101:06:44
25:26:00
45:02:19

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @SamanthBha ,

Please try to create a new column with below dax formula:

 

Column =
VAR _a = [Column1]
VAR _hour =
    DIVIDE ( _a, 3600 )
VAR _id1 =
    FIND ( ".", _hour )
VAR _val =
    LEFT ( _hour, _id1 - 1 )
VAR _b =
    MOD ( _a, 3600 )
VAR _minute =
    DIVIDE ( _b, 60 )
VAR _id2 =
    FIND ( ".", _minute )
VAR _val1 =
    LEFT ( _minute, _id2 - 1 )
VAR _second =
    MOD ( _b, 60 )
RETURN
    _val & ":" & _val1 & ":" & _second

 

vbinbinyumsft_0-1686553132566.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
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

1 REPLY 1
Anonymous
Not applicable

Hi @SamanthBha ,

Please try to create a new column with below dax formula:

 

Column =
VAR _a = [Column1]
VAR _hour =
    DIVIDE ( _a, 3600 )
VAR _id1 =
    FIND ( ".", _hour )
VAR _val =
    LEFT ( _hour, _id1 - 1 )
VAR _b =
    MOD ( _a, 3600 )
VAR _minute =
    DIVIDE ( _b, 60 )
VAR _id2 =
    FIND ( ".", _minute )
VAR _val1 =
    LEFT ( _minute, _id2 - 1 )
VAR _second =
    MOD ( _b, 60 )
RETURN
    _val & ":" & _val1 & ":" & _second

 

vbinbinyumsft_0-1686553132566.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.