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
Filipe89
Frequent Visitor

Convert to Time and SUM the value

Hi everyone, 

 

on my project i tryied i have the detail of the time that took the user to do an action. 

Inicialy it was a decimal value (BusinessTimeSpendWhitsubtasks), but i converted the value to time format (Tempo), but i cannot SUM the total, or gives me an error that the type is text so i cannot SUM 

Filipe89_0-1675018717413.png

I just want to sum the total of Tempo columm 

If i try to convert to type Hora(HOUR) it says it cannot do it because is text type. 

Filipe89_1-1675018907557.png

Could some one have any idea how to do it ? 

Thank you 

3 REPLIES 3
v-rongtiep-msft
Community Support
Community Support

Hi @Filipe89 ,

Please have a try.

Change the type to the time type.

vpollymsft_0-1675129476046.png

Then create a measure.

su = SUM('Table'[time2])-SUM('Table'[time1])

 

I have also found a similar post, please refer to it to see if it helps you.

Solved: Sum up the time format - Microsoft Power BI Community

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Filipe89
Frequent Visitor

Hi, Thanks for the reply,

I created a new collum and tryed to apply your exemple, once whit the collum "Businesstime spendwhitsubTasks" and once whit the collumn "Tempo", but might be something missing, because whit the first table gives me the warnig " cannot convert text to number  ", whit the column "Tempo" says it cannot work whit values of the type string.  Any ideia of what could be missing ?

thank you for the help 

Greg_Deckler
Super User
Super User

@Filipe89 Try something like this: Chelsie Eiden's Duration - Microsoft Power BI Community


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.

Top Solution Authors