Hi,
I have two tables that I need to combine using a calculation.
The first, Table 1, has three fields and thousands of rows.
Item No. | Start Date | End Date |
123456 | 010124 | 070924 |
| 123457 | 050224 | 300924 |
The second, Table 2, has three fields and 73 rows.
| Year | Month | Month End Date |
| 2024 | 1 | 310124 |
| 2024 | 2 | 280224 |
I want to see where an item was live for each period, so the result would look like this:
| Item No. | Start Date | End Date | 01-2024 | 02-2024 |
| 1232456 | 010124 | 070924 | 1 | 1 |
| 123457 | 050224 | 300924 | 0 | 1 |
I can perform this quite manually by using a cross tab to switch the orientation of the dates and joining the two tables on record number.
I would then copy the dates to all rows using a Multi-Row Formula.
For each month I would perform a calculation to determine if the item was live in each period.
I can do this but, given that there are 5 years, each with 12 months, this would take a long time to set up.
Is there a quicker way to perform the calculation by looking up the relevant month end date based on the field heading (i.e. look for the start date of item 123456, check the Start Date is before the Month End Date from the second table and the end date is after the Month End Date from the second table)
Any pointers would be massively helpful.
Thanks, Feastie.