This may be a very easy solution and if so please excuse my ignorance. I am trying to filter my dataset by hour/minute combination. I have millions of records with times covering all 24 hours. I want to filter my records for anything after 7:30AM and Before 3:30PM. I am having a devil of a time figuring this out. I can use datepart for hour and then again for minute, but the problem is that it filters on both individually (Hr - 1-23 and Min 1-60). If I filter on MINUTE, I then exclude minutes 1-29 for the HOURS between 7AM and 3PM. This doesnt work for me.

Is there an easy way to do this other than setting up sets for every hour/minute combination and then exclude? That is tedious as there will be hundreds HH:MM:SS combinations. Please I need your help!

I am looking at Surgical Start times in our OR. The hours the OR are "Scheduled Open" are M,Tu,We. Fri 7:30AM to 3:30PM. On Th the hours are 8:30AM to 3:30PM. Of course there are cases that are added on, but I want to look at just those cases that fall with the OR Normal Operating Hours.

When I place a date field in the view and make it discrete, I can format the field to Hour or to Minute, but not a combination of the two. How do I get 7:30AM as a beginning point of a date range and 3:30PM as the end date of a data range while still looking at every calendar day over 3 years worth of data?

There are multiple things going on in your email, I’ll try to take them apart so we can be on the same page:

1) Tableau doesn’t natively understand times (it understands dates and datetimes). We can do times by normalizing all dates to a single day and then formatting that as a day, for example DATETIME(FLOAT([dateTimeField])-INT(dateTimeField])) and then formatting that to hh:mm. Otherwise the days will be in the date time and that will be a pain to deal with.

2) You talk about placing a date field in the view, just to be clear are you talking about putting the field on the Filters Shelf (which is in the workspace but doesn’t define the viz level of detail) or on another field?

3) Making a pull into a discrete (blue) pill tells Tableau you are interested in seeing the exact values. If you want a range filter then the pill needs to be continuous (green), and only numbers, dates, and datetime datatypes can be green pills.

4) The filter criteria you specify are more complex than you’d initially stated because it’s both day of week and time of day. You wouldn’t be able to get the desired results using a continuous range filter because it can’t handle that complexity, so you’d have to use a calculation that includes the day of week. I’d use something like this: