You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

QuickSight中AvgOver函数抛出VISUAL_CALC_REFERENCE_MISSING错误的技术求助

Fixing VISUAL_CALC_REFERENCE_MISSING Error in QuickSight Calculated Field

Hey there! Let's work through this QuickSight issue you're facing. I'll break down why the error is happening and walk you through the fixes step by step.

What's Causing the VISUAL_CALC_REFERENCE_MISSING Error?

Your original calculated field uses a nested aggregation (sum(Score) inside avgOver()) that doesn't align with your actual goal, and likely conflicts with how QuickSight expects dimensions to be set up in your visualization. This error usually pops up when the calculated field's logic doesn't match the dimensions/measures you've added to your visual, or when the aggregation hierarchy is misaligned.

Step 1: Correct the Calculated Field Logic

Your goal is to get the average Score for each Year + MeasureID combination. You don't need to sum the scores first—instead, calculate the average directly over the two dimensions. Use this formula instead:

avgOver(Score, [MeasureID, Year], PRE_AGG)
  • The PRE_AGG parameter ensures QuickSight calculates the average at the row level before aggregating by your specified dimensions, which gives you the exact average you need for each group.

Alternatively, you can skip the calculated field entirely: just drag the raw Score field to your visual's "Values" area, then change its aggregation to Average, and add Year and MeasureID to the "Dimensions" area. QuickSight will handle the grouping automatically.

Step 2: Verify Your Visualization Setup

Make sure your visual (like a table or bar chart) has these elements configured:

  • Dimensions: Add both Year and MeasureID here—this tells QuickSight to group your data by these two fields.
  • Values: Add either your corrected calculated field, or the Score field set to Average aggregation.

Step 3: Test the Results

Once you've updated the field and visual setup, you should see the correct averages:

  • 2016 + ID1: (0.5 + 0.4)/2 = 0.45
  • 2016 + ID2: 0.2
  • 2017 + ID1: 0.6
  • 2018 + ID2: 0.3

That should resolve the VISUAL_CALC_REFERENCE_MISSING error and give you the data you need!

内容的提问来源于stack exchange,提问作者Vijay Venkatesh

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.30 02:47:41