Sum only current year balance amount by employee ID

Hi There

I am trying to put a filter YEAR([CLAIM DATE (RECEIPT DATE)])=YEAR(TODAY()) in the below expression but there seems to be always an error. Anyone knows where to put this filter so as every year the Blance Amount will only cum the current year amoutn by employee ID.

[MC ENTITLEMENT]-((SUM(
SELECT(Medical Chit[REIMINBURSE AMOUNT],([EMPLOYEE ID]=[_THISROW].[EMPLOYEE ID]))
))+[REIMINBURSE AMOUNT])

What is the formula that gives the error? And what that error is?

I addded the year expression behind and the AND before the SUM. It shows

The AND() is in wrong place. You need to use it inside of the SELECT(). Something like.. SELECT(Medical Chit[Reimimburse amount],AND(…))

1 Like

Thanks for the sugguestion. I manage to use the IF() function like below

[MC ENTITLEMENT]-((SUM(
SELECT(Medical Chit[REIMINBURSE AMOUNT],([EMPLOYEE ID]=[_THISROW].[EMPLOYEE ID]))
))+IF(YEAR([CLAIM DATE (RECEIPT DATE)])=YEAR(TODAY()),[REIMINBURSE AMOUNT],0))