My corporate calendar has 2017 to 2022.
My Budget data has values past 2022.
My Sales records have values before 2017.
One option is to obviously only take data that matches an entry in the calendar.
One option would be to extend the calendar (really dont want to do this as the calendar is a little crazy)
The final option is to add two lines to the calendar with Surrogare keys of -99999999 and +99999999.
Then I need to look at the surrogate key in the Budget table and if it does not exist in the date table (i.e sk_budget_date >MAX('dim Date[sk_date]) then +99999999
This then needs to happen on the other tables.
I want to keep it as low impact as possible.
I could in the Budget Query merge the date Query to get the sk_date column (joined on sk_budget_date = 'dim Date[sk_date]). If the retuerned field is NULL then +99999999. But I think this may add a lot of overhead is there a better way?
Please note that if you add these surrogate keys to your Dates table, I expect you can no longer validate aka mark it as a date table because that requires a contiguous range…
Work around suggestion. Add 31-12-2016 for surrogate key -99999999 and 1-1-2023 for surrogate key +99999999 then exclude both first- and last row from the Date column before you pass it to Table.Profile like so: