Forum Discussion
Lookup target based on date
Hi everyone,
I am building a report to show whether business Actions are on-track or off-track. I am unsure how to lookup the target for each Action based on today’s date.
In one query, I have a list of Actions and the percent they have actually been Completed as at today:
Action Name | % Completed |
Action1 | 26 |
Action2 | 44 |
Action3 | 96 |
Action4 | 16 |
Action5 | 55 |
In a second query, I have the amount we expect the action to be completed by at the end of each quarter. The same Actions are repeated across several rows to show their target at the end of each quarter:
Action Name | Quarter | Target |
Action1 | Sep 2021 | 10 |
Action1 | Dec 2021 | 20 |
Action1 | Mar 2022 | 40 |
Action1 | Jun 2022 | 65 |
Action1 | Sep 2022 | 80 |
Action1 | Dec 2022 | 100 |
Action3 | Sep 2020 | 15 |
Action3 | Dec 2020 | 20 |
Action3 | Mar 2021 | 40 |
Action3 | Jun 2021 | 50 |
Action3 | Sep 2021 | 75 |
Action3 | Dec 2021 | 100 |
Other important factors to note:
- Not all Actions listed in query 1 have targets set for them in query 2, so they do not appear in query 2 (such as Action2).
- Some Actions have targets listed in query 2, but no target for the current quarter (such as Action3). In these cases, the target should be the last target listed.
How can I use these two tables to determine what the current target for each action is?