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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

Concatenate date and time from different columns in one column in power bi Desktop

I'm trying to concatenate date and time from different columns in one column in power bi Desktop but i don't known how to do that.
In excel is very simple only i need sum the two columns, por example a1 + b1 where a1 is the date and b1 is the time

Thanks by the help

2 ACCEPTED SOLUTIONS
camargos88
Community Champion
Community Champion

Hi @Anonymous ,

 

Try this one for a calculated column:

 

DateTime = 'Table 2'[Date] & " " & TIME(HOUR('Table 2'[Time]); MINUTE('Table 2'[Time]); SECOND('Table 2'[Time]))
 
After it just change the DataType to Date/Time on Column Tool tab
 
 


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



View solution in original post

MarcoPessina
Resolver IV
Resolver IV

Hi @Anonymous ,

you can try this:

Annotation 2020-05-08 095516.jpg

It works if you have a source table like this:

Annotation 2020-05-08 095655.jpg

Hope it helps.

Cheers,

Marco

View solution in original post

4 REPLIES 4
MarcoPessina
Resolver IV
Resolver IV

Hi @Anonymous ,

you can try this:

Annotation 2020-05-08 095516.jpg

It works if you have a source table like this:

Annotation 2020-05-08 095655.jpg

Hope it helps.

Cheers,

Marco

Hi Marco,

 

It really did help.

 

Thanks

camargos88
Community Champion
Community Champion

Hi @Anonymous ,

 

Try this one for a calculated column:

 

DateTime = 'Table 2'[Date] & " " & TIME(HOUR('Table 2'[Time]); MINUTE('Table 2'[Time]); SECOND('Table 2'[Time]))
 
After it just change the DataType to Date/Time on Column Tool tab
 
 


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Hi

 

I am very new to PowerBi and I just tried your forumla, it works but I had to make a slight adjustment.

 

In your answer you are using " ; " between the time periods, PowerBi didn;t like that when I tried it but it worked when I used " , " instead.  Not sure if theis is change in PowerBi or typo in your response.  

 

Kinds regards

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.