I’m building an inventory aging forecast analysis in QuickSight that calculates aged inventory fees. These fees are only charged for inventory stored for 120, 150, or 180 days, requiring calculations up to day 180 with monthly rolling calculations.
The analysis tracks 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
Technical Implementation
Calculation Logic:
-
Using nested ifelse logic (avoiding max/min functions as they cause errors in QuickSight)
-
Dependency chain: Day30 → Day60 → Day90 → Day120 → Day150 → Day180
-
Aging rolls over every 90 days, with monthly sales deducted from the highest aging bucket first
Core Issue
When users adjust parameters in the dashboard, the following error occurs:
Error Details:
-
Region: us-east-1
-
Timestamp: 1767753720197
-
RequestId: 08abf0f6-1313-480f-b064-764b32255dd3
The visual displays a calculation error related to the dependency chain.
Technical Constraints
-
SPICE Limitation: SPICE is enabled but cannot cache parameterized calculation results
-
Real-time Recalculation: When users adjust parameters, all dependent fields must be recalculated in real-time
-
Data Volume: The dataset contains multiple ASINs (potentially thousands of records)
Questions for the Community
-
Performance Optimization: How can I optimize the dependency calculation chain to improve performance?
-
Alternative Design: Is there a better approach to structure this calculation logic?
-
Error Prevention: How can I maintain real-time responsiveness while avoiding calculation timeout errors?
Before Question link: How to resolve errors caused by dependency calculations? - Q&A - Amazon Quick Community