Hi,
I am trying to display a timeseries that contains an as_of date and timestamp date. My dataset is as below
as_of timestamp_utc value
1-1-2025 01:00:00 1-1-2025 01:30:00 1
1-1-2025 01:00:00 1-1-2025 01:45:00 2
1-1-2025 01:00:00 1-1-2025 02:00:00 3
1-1-2025 01:15:00 1-1-2025 01:45:00 4
1-1-2025 01:15:00 1-1-2025 02:00:00 5
1-1-2025 01:15:00 1-1-2025 02:15:00 6
1-1-2025 01:30:00 1-1-2025 02:00:00 7
1-1-2025 01:30:00 1-1-2025 02:15:00 8
1-1-2025 01:30:00 1-1-2025 02:30:00 9
Relative to the current time, I want to display the values from the latest as_of that is available. For example,
- if current time is between 01:03 to 01:17, I want to show the rows with latest as_of 1:00
- if current time is between 01:18 to 01:32, I want to show the rows with latest as_of 1:15
- if current time is between 01:33 to 01:47, I want to show the rows with latest as_of 1:30
How do I fix this timestamp in quicksight? I have created a parameter predstart that is as below:
Then I created a calculated field:
ifelse(
extract("MI", now()) < 3, addDateTime(-15, "MI", ${predstart}),
extract("MI", now()) < 18, addDateTime(-extract("MI", now()), "MI", ${predstart}),
extract("MI", now()) < 33, addDateTime(15 - extract("MI", now()), "MI", ${predstart}),
extract("MI", now()) < 48, addDateTime(30 - extract("MI", now()), "MI", ${predstart}),
addDateTime(45 - extract("MI", now()), "MI", ${predstart})
)
Is that correct? how do i then add this to the filters