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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Combine date + time & calculate the duration

Hi all,

 

I have 2 question regarding below data

 

1. May I know how do I combine date & time from different column ?

2. How can I calculate the duration of the time in minute?

 

nuhasan_1-1655438184057.png

 

Regards,

Nuha

1 ACCEPTED SOLUTION
Vijay_A_Verma
Super User
Super User

Select your date columns and convert the column type to date. Do the same for time columns to convert them into time columns.

To combine after conversion

=[Date Column]&[Time Column]

 

However if don't want to convert the columns, use below formula

=Date.From([Date Column])&Time.From([Time Column])

 

If you want to convert Time into hours

=Number.From([Time Column])*24

If you hadn't converted column into Time, then

=Number.From(Time.From([Time Column]))*24

View solution in original post

5 REPLIES 5
Vijay_A_Verma
Super User
Super User

Select your date columns and convert the column type to date. Do the same for time columns to convert them into time columns.

To combine after conversion

=[Date Column]&[Time Column]

 

However if don't want to convert the columns, use below formula

=Date.From([Date Column])&Time.From([Time Column])

 

If you want to convert Time into hours

=Number.From([Time Column])*24

If you hadn't converted column into Time, then

=Number.From(Time.From([Time Column]))*24

Anonymous
Not applicable

Hi @Vijay_A_Verma ,

 

Thanks! Done combine as below. 

 

How can I calculate the duration between end time to start time in MINUTE?

 

End Time - Start Time = how many MINUTE

 

nuhasan_1-1655449918345.png

 

Regards,

Nuha

 

= Duration.TotalMinutes([End Time]-[Start Time])

Anonymous
Not applicable

Hi @Vijay_A_Verma ,

 

THANKS A LOT!!

 

Do you know what is wrong with my formulation below? Keep getting error

 

nuhasan_0-1655454551686.png

 

Regards,

Nuha

 

if then will be

if [VGWTS]="ZN04" or [VGWTS]="ZN05" then.................

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors