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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
EvertonGS89
New Member

Help Calculate duration of hours

I need to calculate the difference between this time so when I do the calculation the result is this could you help me

 

,,Tempo = DATEDIFF('f-_PRINCIPAL'[Hora Inicio],'f-_PRINCIPAL'[Hora Fim], SECOND)

image.png
But the result is that

EvertonGS89_0-1702420885080.png

 

 
1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hi @EvertonGS89 

Since the columns Data Inicio & Data Fim contain datetime values, you should be able to reference them instead to get the expected difference in seconds:

Tempo =
DATEDIFF ( 'f-_PRINCIPAL'[Data Inicio], 'f-_PRINCIPAL'[Data Fim], SECOND )

Does this work for you? 


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

View solution in original post

2 REPLIES 2
EvertonGS89
New Member

Thank you!

OwenAuger
Super User
Super User

Hi @EvertonGS89 

Since the columns Data Inicio & Data Fim contain datetime values, you should be able to reference them instead to get the expected difference in seconds:

Tempo =
DATEDIFF ( 'f-_PRINCIPAL'[Data Inicio], 'f-_PRINCIPAL'[Data Fim], SECOND )

Does this work for you? 


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Solution Authors