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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. 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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.