Ok, so I've gotten as far as getting my durat...

Ok, so Iโ€™ve gotten as far as getting my duration for each operation Iโ€™m needing. Now, Iโ€™ve been wanting to filter the data in two columns (Repair Order and Operation) in my [Entries] table in order to sum the durations and be able to view the total time value in a separate table [Repair Order]. In order to filter and sum this data I used

=SUM(SELECT(Entries[Duration Value],AND([Repair Order]=[_THISROW].[Repair Order], [Operation]=[_THISROW].[Operation])))

I use smart sheet so I ran into the issue of not being able to sum a โ€˜Durationโ€™ since it wasnโ€™t a value/number. I referenced a Timesheet app that pointed me in the direction of creating an app formula via a virtual column to convert the time value into a decimal format. In order to convert this time value in the virtual column โ€˜Duration Valueโ€™ I used

=HOUR([Duration])([Minutes]/60)+([Seconds]/3600)+[Hours]

This however, did not work and I am still unable to sum my durations for an โ€˜Operationโ€™ from a specific โ€˜Repair Orderโ€™ and view that information in another table. Iโ€™ve given screen shots to detail it out a bit better as well. Any suggestions?

0 16 487
16 REPLIES 16

What accuracy do you want to use? Is one minute enough or 15 minutes or something else?

Iโ€™d like to have it down to the minute. The timestamp is down to the second so if that is possible then i wouldnโ€™t be against being that accurate.

It can fail if the formula is not well constructed. You should take a precausion what can go wrong and then arrange a suitable formula for those reasons.

Yes, at least iโ€™m able to get a duration in decimal form. Thanks for the help on that! I guess I just canโ€™t wrap my head around my I canโ€™t sum the decimals with the formula Iโ€™ve given.

Are you using the SUM(SELECTโ€ฆ) expression in a normal or virtual column? If itโ€™s in normal column, it wonโ€™t calculate the value if you donโ€™t open the record. Because you are reading values from another table, you should use virtual.

I actually had all of my columns as normal. So you are saying that my [hour], [minute] and [second] columns can stay as โ€œnormalโ€ but I should change my [Duration] column in the other table that has the sum expression as virtual?

Because how would this value display in my smart sheet if I make it a virtual column?

When you want to calculate the result from other tables, you have two options in generally. Adding a virtual column to calculate the value or using a sheet formula in Smartsheet. If you use virtual column, it wonโ€™t save any data into the Smartsheet from that column.

You were quite closeโ€ฆ you can calculate the duration with the virtual column. Your formula just wasnโ€™t correct exactly. HOUR([Duration])*60+MINUTE([Duration])+SECOND([Duration])/60 will give the duration in minutes. When you know that, you can sum them together.

is my sum formula correct? because it is still referencing the [Duration Value] column which is my virtual column. Or should I reference the [Duration] column which is my physical spreadsheet column? I ask because I still wasnโ€™t able to sum the data and populate my [Duration] column in the โ€˜Repair Orderโ€™ Table.

Or do you think its smart sheet that is unable to read and give the value?

You should add that formula that I described into your virtual column. When the virtual column is calculated, you can sum those values and save that decimal into the spreadsheet.

Ok, so iโ€™ve got a decimal value to pull up and represent my Duration in the [Entries] Table but I still canโ€™t get the sum of the values to pull up on my [Repair Order] table. Is the =SUM(SELECT(Entries[Duration Value],AND([Repair Order]=[_THISROW].[Repair Order], [Operation]=[_THISROW].[Operation])))

formal incorrect?

Yes the format is basically correct. What is the result of this formula?

Iโ€™m still getting blank cells in my [Repair Order] Table for the Duration column. Now, I donโ€™t have all my cells fully populated in the Operations column since this is a โ€œtestโ€ sheet, but you think it would still populated any cells in the Duration column that had entries in it, correct?

The entries you see highlighted below are for Repair Order 1- Bob Marley, Operation 70 and 100 so you would think it would populate Duration value for rows 6 and 9 in the [Repair Order] table. Does the expression glitch if it is unable to populate every Entry?

Top Labels in this Space