Custom Datetime aggregate

In a visual, I would like to do a sales count, aggregated per 12hours.
However, in my visualization, the datetime aggregate option is only possible for Minute, Hour, Day, Week, Month…
How can I aggregate per 12hours easily?

Thank you

Hi @pam - Welcome to AWS QuickSight community and thanks for posting the question. In this case if you create a calculated field for 12 hours and do the aggregations.

Hi @Biswajit_1993 @David_Wong @Naveed - Any feedback on this.

Regards - Sanjeeb


You can do this by calculation field round on 1,2,3… hours and based on this like if new_calu between 1 to 12 and do your sale count in other calculation.

This is the logic you can do it.

Naveed Ali


We will do that. Thank you

1 Like


Can anyone help me with this for custom DateTime aggregate i need to use in KPI to display result like default YoY where old value and new value are shown with Diff Percent?

I need to create 3 months rolling For eg: if we are on 11th March 2024 the month considered will be 12th December 2023 to 11th March 2024.

Similar fashion for 90days and 1year.

I have achieved this partially by using calculated field.
MaxTimelineDate is a Paramter holding date
Formula : ifelse({Investment Date} >= addDateTime(-3, “MM”, ${MaxTimelineDate}) AND {Investment Date} <= ${MaxTimelineDate},1,0).

How should i get previous to previous 3 months values to display in KPI with date like the first image with custom datetime aggregation?