Measure for CountIF X hours from Time Stamp?

pete234

Active Member
Joined
Feb 10, 2004
Messages
419
I made this measure to feed a daily pivot summary of call totals.
=IF(COUNT([Start Time])+.1666667>=30,TRUE)
It's obviously wrong but I don't know how to get it to be COUNTIF.
I want it to say true if it's 30 calls or more during 4 hours from Start time.
Right now it says TRUE if anything is >30 no matter what time.

I tried just making a calculation of Start Time +4 or .166667 and I keep getting an error saying it can't find Start Time and value can't be determined.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Pete,

Assuming [Start Time] is a column, it should also have a TableName in front of it, like: TableName[Start Time]
Could you tell us more on what tables / columns you have and where the measure will be used for?
 
Upvote 0
I figured out a way around this by getting them to accept calls before 1pm (lunch) for now which was easy enough.
But in the interest of "just in case" [Start Time] is fixed 00:00 from the output formatted in the daily log.
The table I'm working with feeds a pivot table but here I'm just using the raw data with a couple Related To fields.
The original idea was to not make a fixed "lunch time" but 4 hours from each reps first call, per day, how many calls?
I haven't tried to add the tablename but I think my formula is still wrong?
The fields are Rep Name, Start Time, Duration (Calc), Duration Secs, Date.
Table Name is CallData. But each day would need calc on MIN on of Start Time (not each start time) which to me is something like SUMX?
 
Last edited:
Upvote 0
Can you send me the workbook, or a workbook with sample data illustrating the problem?

Data is work stuff so can't really send. I recreated it here to show you. It's just a call log really.
The formulas here really aren't relevant as that is done in Powerpivot on the table. Not sure how to turn off.
Column H would contain the Count of Calls that occurred before or equal to 4 hours after start. It's ok if it repeats for each rep each day. Thanks for any help.

Excel Workbook
ABCDEFGH
1Rep Team (Related To)Rep NameDateStart TimeEnd Time (calc)Duration SecDuration (calc)Ct
2NorthBob10/1/201210:00 AM10:02 AM12502:05?
3NorthBob10/1/201210:15 AM10:16 AM10001:40*
4NorthBob10/1/201210:20 AM10:20 AM1500:15*
5NorthBob10/1/201211:02 AM11:05 AM20003:20*
6NorthBob10/1/201211:06 AM11:08 AM12502:05*
7NorthBob10/1/201211:15 AM11:25 AM63010:30*
8NorthBob10/1/20121:15 PM1:20 PM12002:00*
9NorthBob10/2/20129:00 AM9:00 AM2500:25*
10NorthBob10/2/20129:15 AM9:15 AM5500:55*
11NorthBob10/2/201210:20 AM10:26 AM40006:40*
12NorthBob10/2/20121:30 PM1:34 PM25004:10*
13SouthBarb10/1/20129:00 AM9:02 AM14502:25*
14SouthBarb10/1/20129:15 AM9:17 AM12002:00*
15SouthBarb10/1/201210:20 AM10:22 AM15002:30*
16SouthBarb10/1/201211:02 AM11:05 AM20003:20*
17SouthBarb10/1/201211:14 AM11:17 AM22003:40*
18SouthBarb10/1/201211:25 AM11:30 AM30005:00*
19SouthBarb10/1/201211:45 AM11:47 AM15002:30*
20SouthBarb10/1/201211:50 AM11:52 AM16502:45*
21SouthBarb10/2/201211:14 AM11:20 AM40006:40*
22SouthBarb10/2/201211:25 AM11:26 AM10001:40*
23SouthBarb10/2/201211:45 AM11:47 AM14002:20*
24SouthBarb10/2/201212:55 PM12:58 PM20003:20*
Sheet2
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,931
Messages
6,175,465
Members
452,646
Latest member
tudou

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