Unable to get first value

firstValue({LAST_ONSITE_DESK_RATING},[{LAST_ONSITE_DATE} DESC],[{LAST_ONSITE_DATE},{LAST_ONSITE_DESK_RATING}])

Or firstValue({LAST_ONSITE_DESK_RATING},[{LAST_ONSITE_DATE} DESC])

Tried using these 2 formula : Iam getting error Error details

region: us-east-1
timestamp: 1736426374446
requestId: 709d57f7-3beb-4a98-a5e2-bb5f30a9c336
sourceErrorCode: VISUAL_CALC_REFERENCE_MISSING
sourceType: SPICE

Hi @deepa.singh

Looking at the error message it appears that the fields in your calculation are expected to be present in the visual for the computation and since they are missing the engine complains.

If you could share your visual and some details of your dataset it would help to understand the issue better and comment.

Regards,
Giri


Attached KPI and The values Used in the field

Dataset has column LAST_ONSITE_DESK_RATING : Has string values like statisfactory , Good , Failed

And date column has date

Hi @deepa.singh,
Following up on what Giri mentioned earlier; it looks like you’re not including one of the dimensions in your visual that’s being used in your calc. field. Have you tried adding the date field to your visual to see if that solves the issue?

Let us know what happens when you try to add that field to your visual as well and if you’re still encountering the same error.

Thank you!