LAC calculated field in Dataset

I am trying to create the below calculated field in dataset but I get an error saying that “Function MAX should have 1 argument(s) instead of 2 argument(s)” while in

round(ifelse(({State}=‘APPROVED’ OR {State}=‘P_APPROVED’)
AND {Ev State}=‘APPROVED’
AND {Type}=‘Green’,
max({Amount},[{sales_id}]),
NULL)
,2)

you can max amount above the ifelse condition. like this:
round(max(ifelse(({State}=‘APPROVED’ OR {State}=‘P_APPROVED’)
AND {Ev State}=‘APPROVED’
AND {Type}=‘Green’,
{Amount},NULL) ), [{sales_id}] )
,2)

1 Like

No. Again I get the same error.
I can’t max with two arguments in datasets.

I don’t know if it is even possible. I can’t do just the below even without the ifelse statement

max({Amount},[{sales_id}])

1 Like

That’s strange!, but you can also try maxover function instead of just max.

1 Like

Hi @pantelis,
It’s been awhile since we last heard from you, did you have any additional questions regarding your post?

If we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you!

Hi @pantelis,
Since we haven’t heard back, I’ll go ahead and close out this topic. However, if you have any additional questions, feel free to create a new post in the community and link this discussion for relevant information if needed.

Thank you!