Rolling Date with different time start

I am trying to set a rolling date that starts at 06:30:00 and ends at 06:30 the next day. Currently when I set my rolling dates it defaults to 00:00 as the start and end times.

Is there a way to do this? I have also tried parameters but they seem to have the same limitations.

Hello Owen, if you can start from 6:00, then you can set Start Date using “Last N hours”.
image

If you must use 6:30, then you may need to set up a parameter. This page may help: How to setup a time range - #4 by Biswajit_1993

2 Likes

Thanks, Sophia. I like the rolling hours idea and tried but it doesn’t seem like it works for my use case.

I dont want the hours to change, just the dates. When I change it to rolling hours then the hours change each hour and the owners are not always going to look at this at 6, thats just the data thats needed.

But, using the link you provided, I think I have settled on the fact that I can set the times as static and the user will just have to pick the date, which is faster than changing the time, IMO.

Hello @Owen, I think the best solution for this will be to create a startDate and endDate parameter. Make sure you set the granularity down to the minute. Then create a control for each so the user can set date values with a calendar selection.

Now instead of directly filtering your visuals with the values that are returned from the parameters, use them in an ifelse statement to return your date field where it is greater than or equal to those parameters with the datetime change accounted for.

Using this calculation:
ifelse(addDateTime(390, 'MI', ${startTime}) <= {date} AND addDateTime(391, 'MI', ${endTime}) >= {date}, {date}, NULL)

You can return that field instead of your original date field to only see dates that match. Also, another thing to note, if you don’t want the user to be able to select a different date range, but just the start date, you can use the addDateTime based on the first parameter. Just make sure when you create the parameter to the minute granularity, that you remove the HH:mm portion of the date format from the control so the user can’t break your calculated field.

EditDateFormat

I’ll mark this as the solution, but if you have any follow-up questions about implementing this, please let me know!

Welcome to the QuickSight Community, @Owen!

2 Likes