cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors