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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Easy way to convert seconds to minutes in multiple columns?

I'm creating multiple reports based off of .txt files where the time is in seconds.  I have about 13 columns in a single data source that need to be converted from seconds to minutes.  The kicker is that I have 8 different data sources which brings me to over 100 columns that need to be converted from seconds to minutes.

 

The text files are coming from Avaya and I don't have an option to change how theyre formatted before they become text files.

 

I know I can simply do something like this for each column but it's just going to take time and I don't think it would be the best way to do it resource wise.  Any better way to convert these columns?

 

 

NewColumn = [col]/60

 

 

 

Currently it looks like this

col1col2
180120

 

 

Looking to easily/efficiently transform 13 columns to look like this

newcol2newcol2
32
1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey @Anonymous ,

 

you might consider this using these steps in power query

  1. mark the columns that contain the seconds
  2. unpivot these columns, this will create two new columns, attribute (the name of the former column) and value
  3. create a new column "min" divide the value by 60
  4. delete the value column
  5. pivot the attribute min columns back again

Maybe this approach will provide some new ideas.

 

Regards,
Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

3 REPLIES 3
TomMartens
Super User
Super User

Hey @Anonymous ,

 

you might consider this using these steps in power query

  1. mark the columns that contain the seconds
  2. unpivot these columns, this will create two new columns, attribute (the name of the former column) and value
  3. create a new column "min" divide the value by 60
  4. delete the value column
  5. pivot the attribute min columns back again

Maybe this approach will provide some new ideas.

 

Regards,
Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Anonymous
Not applicable

Wow this absolutely blows my mind I've never done this before it's amazing!  Thanks so much this makes things SO much easier.

My pleasure!



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.

Top Solution Authors