How to resolve errors caused by dependency calculations?

My goal is to calculate the fees for aged inventory, but this fee is only charged for inventory that has been in stock for 120, 150, or 180 days. Therefore, I need to calculate up to day 180; and the aged inventory is calculated on a rolling basis each month.

I’m building an inventory aging forecast analysis in QuickSight with 6 time points (Day30, Day60, Day90, Day120, Day150, Day180), where each time point calculates 5 aging buckets (0-90 days, 91-180 days, 181-270 days, 271-365 days, 365+ days).

But Visuals shows this error ( image ):
region:us-east-1
timestamp:1767753720197
requestId:08abf0f6-1313-480f-b064-764b32255dd3

Each time point depends on the previous one: Day30 → Day60 → Day90 → Day120 → Day150 → Day180

  • Using nested ifelse logic (no max or min functions as they cause errors in QuickSight)

  • Aging rolls over every 90 days, with monthly sales deducted from the highest aging bucket first

Additional Context:

  • SPICE is enabled, but it cannot cache parameterized calculation results

  • When users adjust parameters, all dependent fields must be recalculated in real-time

  • The dataset contains multiple ASINs (potentially thousands of records)

Any suggestions or best practices would be greatly appreciated!

企业微信截图_17677544966769

Hi @Haoming

Apologies for the delayed response!

To address the performance issue, we recommend tuning the query to improve execution speed and stability.

Please review the query execution logs when applying filters through parameters. This will help identify which part of the query is taking longer to execute and contributing to the delay or failure. In many cases, complex calculated fields or deeply nested logic can significantly increase query execution time when parameters are involved.

By analyzing the query logs and optimizing the most time consuming sections, you should be able to reduce execution time and avoid related errors.

Hi @Haoming

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!

Hi @Haoming

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!

Hi @Xclipse
Your message was sent during my Chinese New Year holiday, so I’ve created a new topic.