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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
AndyValente
New Member

combine two number columns in new custom column

Hello, I am trying to combine the content of two columns containing number values.

=[hour] & ":" & [min]

doesn't work, as such operation is not allowed with number columns. I have looked around but was not able to find an answer, any advice? Thank you

1 ACCEPTED SOLUTION
MarcelBeug
Community Champion
Community Champion

You may want to get:

  • A time value: #time([Hour],[Min],0)
  • A duration: #duration(0,[Hour],[Min],0)
  • Texts with leading zeroes (e.g 01:05): Text.PadStart(Text.From([Hour]),2,"0")&":"&Text.PadStart(Text.From([Min]),2,"0")
Specializing in Power Query Formula Language (M)

View solution in original post

3 REPLIES 3
tjd
Impactful Individual
Impactful Individual

I don't think you can concatenate numbers.  Try converting Hours and Minutes to text type and then it should work.

MarcelBeug
Community Champion
Community Champion

You may want to get:

  • A time value: #time([Hour],[Min],0)
  • A duration: #duration(0,[Hour],[Min],0)
  • Texts with leading zeroes (e.g 01:05): Text.PadStart(Text.From([Hour]),2,"0")&":"&Text.PadStart(Text.From([Min]),2,"0")
Specializing in Power Query Formula Language (M)

Thanks, after solving the first issue, I was facing the problem of having the wrong hour and minute format in the end, so your code was really helpful.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.