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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Duration

Hi, 
First, when I imported my Excel data I had to set the Data Type as Time.
I was receiving an error when I wanted to set it as Duration. 
Current Duration Format: 13:30 (hh:nn)
I have the Start Time e.g 15:05 and End Time e.g. 16:10
I have tried DAX DATEDIFF but the return came back as 00:00

I am unable to create valid Visualisation for the Time Duration. 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , You will not be able display duration on y axis

 

But this column should work

 

datediff([start time], [end time],second)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thank you @amitchandak 

Unfortunately, this formula doesn't work for me. The result is 00:00
my formula:
TimeDuration =
DATEDIFF('FACT TABLE'[Start Time],'FACT TABLE'[End Time], second)
amitchandak
Super User
Super User

@Anonymous , You will not be able display duration on y axis

 

But this column should work

 

datediff([start time], [end time],second)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors