Forum Discussion
ncbf87
4 years agoFrequent Visitor
Create new query table from existing table with criteria (Employee Leave Records)
Hi all, Problem Statement: I need a clean table of employee leave application with the following adjustments: Leave Start/End date Adjusted by the Quarter (parameter can be manually set in Power ...
Ehren
4 years agoMicrosoft Employee
It might help to break down the problem. To start with, what's the simplest thing you're trying to do? (Ideally this would just be a single step in the process.)
ncbf87
4 years agoFrequent Visitor
1st challenge is to compare Table 1 and Table 2
Table 2 is payrol report and leave data is conclusive.
If there is no record of a Table 2 row in Table 1, append a row. Otherwise, create a row from Table 2
- Ehren4 years agoMicrosoft Employee
Sounds like something you might be able to do using Merge Queries.
- ncbf874 years agoFrequent Visitor
Thanks Ehren, you're right, a Left/Right Anti join type will solve this challenge after ensuring both table structures are the same.
Problem 2: Adjusting the Leave Start and End date to the year, quarter, and month; factoring in Public Holidays (and rosters, but I can use the solution for public holiday for this)