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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

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.

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.