# Datetime measures not working with min/max aggregation types

**URL:** <https://community.holistics.io/t/datetime-measures-not-working-with-min-max-aggregation-types/2408>\
**Category:** Report Bugs\
**Tags:** data-model\
**Created:** [March 6, 2025, 2:49pm UTC](https://community.holistics.io/t/datetime-measures-not-working-with-min-max-aggregation-types/2408 "2025-03-06T14:49:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hannah.paxton](https://community.holistics.io/user_avatar/community.holistics.io/hannah.paxton/32/2117_2.png) [@hannah.paxton](https://community.holistics.io/u/hannah.paxton)\
**Post date:** [March 6, 2025, 2:49pm UTC](https://community.holistics.io/t/datetime-measures-not-working-with-min-max-aggregation-types/2408/1 "2025-03-06T14:49:53Z")

</div>

Hello!

We have first / last datetime measures that are using min / max aggregation types that have recently (in the last ~16 hours) started returning an AQL Compilation Error. However, within a visualization, we can still pull in the date dimension and apply a min / max aggregation with no error. We have also been able to resolve the error on the modeling side by using a custom SQL aggregation type & applying the min/max at the definition.

We can unblock this via the workarounds above, but wanted to open the topic and flag!

---

<div class="post-metadata">

**Author:** ![minhthanh3145](https://community.holistics.io/user_avatar/community.holistics.io/minhthanh3145/32/816_2.png) [@minhthanh3145](https://community.holistics.io/u/minhthanh3145)\
**Post date:** [March 7, 2025, 4:09am UTC](https://community.holistics.io/t/datetime-measures-not-working-with-min-max-aggregation-types/2408/2 "2025-03-07T04:09:49Z")

</div>

Hey @hannah.paxton, thank you for reporting this! We’re aware of this issue and are working on it. In the mean time, your current workaround would suffice. Thank you for your patience, and I’ll keep you posted!

---

<div class="post-metadata">

**Author:** ![vinhhh](https://community.holistics.io/user_avatar/community.holistics.io/vinhhh/32/1085_2.png) [@vinhhh](https://community.holistics.io/u/vinhhh)\
**Post date:** [March 10, 2025, 3:05am UTC](https://community.holistics.io/t/datetime-measures-not-working-with-min-max-aggregation-types/2408/3 "2025-03-10T03:05:03Z")

</div>

Hi @hannah.paxton,  
We have released a patch to fix this issue. Could you double check?

---

<div class="post-metadata">

**Author:** ![hannah.paxton](https://community.holistics.io/user_avatar/community.holistics.io/hannah.paxton/32/2117_2.png) [@hannah.paxton](https://community.holistics.io/u/hannah.paxton)\
**Post date:** [March 10, 2025, 1:35pm UTC](https://community.holistics.io/t/datetime-measures-not-working-with-min-max-aggregation-types/2408/4 "2025-03-10T13:35:46Z")

</div>

Hi @vinhhh,

It works! Thank you!
