Need help with time calculations

Termig8r

New Member
Joined
Apr 29, 2014
Messages
3
I have a series of data that I need to sort. It is in the current format as below

Account Number Status Time-Date Date Time

The "time-date" was split to show date in one cell and time in another...but all are showing as text in my Pivot Table Data.

Status incudes "Account created" "Opened" "Saved" and "Closed".

What I want to do is to be able to sort by Date, showing a list of each account number worked on that date, and have it calculate the time spent on each account number going from the time either created or opened to the time closed...saved is irrelevant in this situation. Any suggestions on how to accomplish this feat?

Any help would be greatly appreciated...Thanks!!
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
How is it being split, in Excel formulae or in Power Pivot? Either way, what is the splitting formula, and have you formatted the results?
 
Upvote 0
You said earlier ... The "time-date" was split to show date in one cell and time in another...but all are showing as text in my Pivot Table Data.... That was what I was referring to.

Can you post your workbook to facilitate this?
 
Upvote 0
but all are showing as text in my Pivot Table Data.
In the powerpivot window did you set the type on the column to Date?

Depending on what you need, you may want to do a calculated column vs a measure (calculated field). but for example, something like this may work as a measure:

[TimeStart] := CALCULATE(MIN(Table1[Date-Time]), Table1[Event Name] = "Record Created" || Table1[Event Name] = "Record Opened")
[TimeEnd] := CALCULATE(MAX(Table1[Date-Time]), Table1[Event Name] = "Record Closed")
[TimeDeltaMinutes] := ([TimeEnd] - [TimeStart]) * 24 * 60
 
Upvote 0
You can wrap your equations in datevalue and timevalue.
=datevalue(left(G2,10))
=timevalue(right(G2,12))

Those should work.
 
Upvote 0

Forum statistics

Threads
1,223,993
Messages
6,175,843
Members
452,675
Latest member
duongtruc1610

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top