Forum Discussion

Dipak_Shaw's avatar
Dipak_Shaw
New Member
3 years ago

Join Tables to create a new table

HI, 

I have a table with some values, all I want join them based on following scenario. 

 

Scenario: All employees manually updates their work KPIs everyday. The issue is when they forget to update or they are on leave.

1. When they updates, their score is 100.

2. When they are on leave their score should be automatically 100.

3. When they forget or any entry not found in the score table then in the mergd table there should be an entry where score should be 0.

 

Now I have 2 tables,

Employee Leave Table

Employee IDFull NameStart DateEnd DateDuration
1Emp 12nd Feb 20234th Feb 20233
1Emp 16th Feb 20236th Feb 20231

 

KPI Table (Manually Entered by Employee)

DateEmp IdFull NameScore
1st Feb 20231Bruce Wayne100
5th Feb 20231Bruce Wayne100
7th Feb 20231Bruce Wayne100
10th Feb 20231Bruce Wayne100

 

Expected Table

DateEmp IDFull NameScore
1st Feb 2023 (Manual)1Bruce Wayne100
2nd Feb 2023 (From Leave)1Bruce Wayne100
3rd Feb 2023 (From Leave)1Bruce Wayne100
4th Feb 2023 (From Leave)1Bruce Wayne100
5th Feb 2023 (Manual)1Bruce Wayne100
6th Feb 2023 (From Leave)1Bruce Wayne100
7th Feb 2023 (Manual)1Bruce Wayne100
8th Feb 2023 (Not Entered)1Bruce Wayne0
9th Feb 2023 (Not Entered)1Bruce Wayne0
10th Feb 2023 (Manual)1Bruce Wayne100

 

Based on expected table my visuals will show.

 

any ideas how can I achieve this?

No RepliesBe the first to reply