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
JMHickman1987
Regular Visitor

How do I create a column that combines columns containing Hour, Day, Week, Month, Year data?

Hello Microsoft Power BI Community,

 

First post and new to Power BI. 


I am currently creating a Power BI visualization that uses a sharepoint excel sheet as a database. The excel sheet contains several courses across the European Union and has a myriad of different course duration ranges. The courses range from single day certifications to PhD length degrees. One of the fields that is a part of the visualization is the course duration. The course duration ranges from hours, days, weeks, months and years. I have seperated the excel sheet into those different increments and organized the rows by course title. 

I am trying to create a new column that combines the course duration. As some courses have durations like of 56 days, I am having to calculate and seperate how many months/weeks/days that would be. As such, we have 5 columns with different time increments. These columns include hour, day, week, month and year. 

Is there a way that I create a column that combines these 5 columns into something that reads like 2 months, 1 weeks 15 days within Power BI? 

If you guys need any more information, please do not hesitate to ask.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@JMHickman1987 , You can have text column, that will not add up

 

example

new column

[Col1] & "Months" & [Col2] & "Days" & [Col3] & "Hours"

 

 

you can add if to handle null, 0 value

 

 

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@JMHickman1987 , You can have text column, that will not add up

 

example

new column

[Col1] & "Months" & [Col2] & "Days" & [Col3] & "Hours"

 

 

you can add if to handle null, 0 value

 

 

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.