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])

desmond_lee_0-1705912243759.png

 

Solved Solved
0 4 78
1 ACCEPTED SOLUTION

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))

View solution in original post

4 REPLIES 4

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

desmond_lee_0-1705912977460.png

 

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

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))

Top Labels in this Space