firstValue error

I write the below and I get “We encountered an error trying to save your calculated field. Please try creating it again.” with no more info. What it the problem? The syntax is correct.
I want to partition by case and quotation and then get the first agency sorted by quotation amount

firstValue(
[{agency}],
[{quotation_amount_usd} ASC],
[
{case_id},
{quotation_id}
]
)

Hi @pantelis

You’re on the right track, but there are syntax errors in the firstValue function. The aggregated measure or dimension should not be enclosed in square brackets. Try the corrected formula.

Example:

firstValue(
    agency, 
    [{quotation_amount_usd} ASC], 
    [{case_id}, {quotation_id}]
)

Thanks @Xclipse for the response. I corrected the formula but now I get the below error. What it means?

Hi @pantelis

Ensure that all referenced fields in your firstValue calculation are added to the visual. If any field is missing, you’ll get the error.

FirstValue Error

Hi @pantelis

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 @pantelis

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!