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!
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.
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.