I'm not sure there's need for the LOD calc here. You want to compare the current value with a previous. Therefore would something like:
IF attr([employeelevel]) = lookup(attr([employeelevel]),-1) THEN 'no change' ELSE 'change' END
This formula may give an agg/non agg error, in which case you may need to wrap the output in attr as well. Note the Compute Using for LOOKUP will also need to be set to make sure the correct prior value is returned.
Hi Andrew :
Thank you for the reply. By previous value I mean the previous month’s value. If I do not fix the emplid, will I not get the job level of the employee right above the current one instead of the same employee’s previous month’s details?
Nishanth Reddy Konkala,
Strategy and Analytics
tel +1 312-228-2682
image001.jpg 2.6 KB
You need to use the Edit Table Calculation - Compute Using to make sure the LOOKUP returns the value from the previous month and not the previous employee in the list. This can be tricky, I suggest you use trial and error on a small sample to understand what is happening.
Did you find any solution besides handling this in the data? I have the same issue with a different data set.