How to pull in correct payroll number of employees in BI Publisher reporting?
I have put together a query where my joins for payroll number are bringing some duplicate lines into my record. On investigation, the joins are not bringing the unique payroll number for when the employee was terminated. If the employee had more than 1 payroll number in their record even if end dated for a specific period of time, all of the payroll numbers are pulling into the report and creating lines for each one.
Does anyone have any ideas on how to bring in the unique payroll number and stop the duplicate records? The code works if only 1 payroll number in history but multiple payroll numbers is causing issues.