# Unable to Use Calculated PRT% Bucket as Dimension (Custom Aggregation Field Error)

**URL:** <https://community.amazonquick.com/t/unable-to-use-calculated-prt-bucket-as-dimension-custom-aggregation-field-error/51399>\
**Category:** Q&A\
**Tags:** feature-request, analysis, calculations, Business-Intelligence-Engineer\
**Created:** [February 4, 2026, 5:43am UTC](https://community.amazonquick.com/t/unable-to-use-calculated-prt-bucket-as-dimension-custom-aggregation-field-error/51399 "2026-02-04T05:43:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vaibhav.narwade](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/vaibhav.narwade/32/23907_2.png) [@Vaibhav.narwade](https://community.amazonquick.com/u/Vaibhav.narwade)\
**Post date:** [February 4, 2026, 5:43am UTC](https://community.amazonquick.com/t/unable-to-use-calculated-prt-bucket-as-dimension-custom-aggregation-field-error/51399/1 "2026-02-04T05:43:26Z")

</div>

Hi Team,

I need help with creating a PRT% bucket dimension in QuickSight for grouping machine counts by location.

### **My requirement**

I want a pivot/matrix like this:

```auto
PRT% Bucket | Location A | Location B | Location C
---------------------------------------------------
0–30 | X | Y | Z
31–50 | X | Y | Z
>50 | X | Y | Z

```

This requires the PRT% Bucket to be a **dimension** so I can place it in ROWS.

* * *

## **Current Data Structure**

- `prtinsec` (int)

- `statusasonist` (timestamp)

- Dynamic date parameters `${StartDate}` / `${EndDate}`

- Multiple rows per machine per day

* * *

## **My Calculated Fields**

### **1. Machine\_PRT\_Sec**

```auto
sumIf(
    prtinsec,
    truncDate('DD', statusasonist) >= ${StartDate}
    AND truncDate('DD', statusasonist) <= ${EndDate}
)

```

### **2. Working\_Day\_Count**

```auto
dateDiff(${StartDate}, ${EndDate}, 'DD') + 1

```

### **3. Machine\_Working\_Sec**

```auto
maxOver(
    86400 * {Working_Day_Count},
    [{machine_name}]
)

```

### **4. Machine\_PRT\_Percentage**

```auto
({Machine_PRT_Sec} / {Machine_Working_Sec}) * 100

```

### **5. PRT % Bucket**

```auto
ifelse(
    {Machine_PRT_Percentage} < 30, "0–30",
    {Machine_PRT_Percentage} <= 50, "31–50",
    ">50"
)

```

* * *

## **Problem**

QuickSight shows this error when I drag `PRT % Bucket` into Dimensions (Rows):

```auto
Custom aggregation field is not allowed as a dimension

```

Even though:

- `Machine_PRT_Percentage` is aggregated inside the formula

- I am using `sumOver`/`maxOver` scoped by `machine_name`

- The bucket logic is simple ifelse

* * *

## **What I Need**

I want to confirm:

1. **Is it possible to create a dimension bucket from an aggregated measure in QuickSight?**

2. If not, **is pre-calculating PRT% bucket in ETL/Athena the only supported solution?**

3. Why do LAA functions (`sumOver/maxOver`) still result in the bucket being treated as a MEASURE?

4. What is the recommended way to achieve group-wise bucketing (e.g., “0–30”, “31–50”) when the underlying value depends on aggregations + date parameters?

Any official guidance or best-practice patterns will be very helpful.

Thanks!

---

<div class="post-metadata">

**Author:** ![DylanMorozowski](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/dylanmorozowski/32/33997_2.png) [@DylanMorozowski](https://community.amazonquick.com/u/DylanMorozowski)\
**Post date:** [February 4, 2026, 3:13pm UTC](https://community.amazonquick.com/t/unable-to-use-calculated-prt-bucket-as-dimension-custom-aggregation-field-error/51399/2 "2026-02-04T15:13:23Z")

</div>

Hello @Vaibhav.narwade, the key here is to use PRE\_AGG within the sumOver/maxOver functions to avoid to custom aggregation error.

```auto
sumOver(
ifelse(
truncDate('DD', statusasonist) >= ${StartDate}
AND truncDate('DD', statusasonist) <= ${EndDate},
{prtinsec}, NULL), 
[{machine_name}], PRE_AGG)

```

Then, for the maxOver, try this:

`maxOver(86400 * {Working_Day_Count}, [{machine_name]}, PRE_AGG)`

We may also need to make some edits to Machine\_PRT\_Percentage and PRT % Bucket calculations as well, but this is the method you need to be using. It basically treats the field like it isn’t aggregated and it avoids custom calculation / aggregation errors. You just need to make sure that all fields being utilized match that functionality.

Let me know if that helps!

---

<div class="post-metadata">

**Author:** ![Xclipse](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/xclipse/32/20455_2.png) [@Xclipse](https://community.amazonquick.com/u/Xclipse)\
**Post date:** [February 15, 2026, 6:48am UTC](https://community.amazonquick.com/t/unable-to-use-calculated-prt-bucket-as-dimension-custom-aggregation-field-error/51399/3 "2026-02-15T06:48:57Z")

</div>

Hi @Vaibhav.narwade

It’s been a while since we last heard from you. If you have any further questions, please let us know how we can assist you.

If we don’t hear back within the next 3 business days, we’ll proceed with close/archive this topic.

Thank you!

---

<div class="post-metadata">

**Author:** ![Xclipse](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/xclipse/32/20455_2.png) [@Xclipse](https://community.amazonquick.com/u/Xclipse)\
**Post date:** [February 20, 2026, 7:52am UTC](https://community.amazonquick.com/t/unable-to-use-calculated-prt-bucket-as-dimension-custom-aggregation-field-error/51399/4 "2026-02-20T07:52:18Z")

</div>

Hi @Vaibhav.narwade

Since we have not heard back from you, I’ll go ahead and close/archive this topic. However, if you have any additional questions, feel free to create a new topic in the community and link this discussion for relevant information.

Thank you!
