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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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