I have the formula below:
(('EE_Comp_01_SabbaticalAccrual_P&L_ReAllocated'
* EE_BU_AllocationFinal
) BY: -> EE_Card_Department,EE_Card_SalaryCurrency, 'EE_Card_P&L', 'EE_Card_Direct/Indirect'])

The highlighted in red, assigned my employees to the department that they belong for each month based on that metric. INSTEAD, I would like to just assign them to the last department they belonged to for each version. I tried inserting “BY LASTNONBLANK: → “ but it did not seem to resolve the issue. See screenshot for the stracture of the EE_Card_Department below:

Basically I want to adjust the formula above, to assign this employee only to department FBS Revenue.
Any ideas?