cancel
Showing results for 
Search instead for 
Did you mean: 

last occurence measure

Former Member
0 Kudos
192

Hello SAC consultants. In an HR model I have a "salary" measure and a "13_salary" measure. The "13_salary" measure is calculated based on the "salary" measure for the month of December, divided by 12. When an employee leaves the company, in months prior to December, I end up having an error in this calculated measure "13_salary". To solve this, I would like to select the last occurrence of the "salary" measure, instead of selecting the occurrence of the "salary" measure in the month of December. It is possible? Do you know any material about this?

RafaelMachado_0-1707923635129.png

 

Accepted Solutions (0)

Answers (1)

Answers (1)

N1kh1l
Active Contributor

@Former Member 

The formula says 13_Salary = Salary_December/12. Where is the salary measure  its Salary_December? Do you have Salary measure for each Month ? As a workaround you can create a few extra measures which will ensure you always have a value in December which you can then divide/12.

N1kh1l_0-1707936687825.png

QuantityLast

N1kh1l_1-1707936737867.png

QuantityYear: This will always have the last populated  period value in December

N1kh1l_2-1707936804221.png

You can divide this measure for december /12

 

Br.

Nikhil