Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Apologies if this isn't the right part of the forum, I am happy to be directed to the appropriate place! I have reviewed a lot of the information around canonical dates here in the Community (Canonical Date - Qlik Community - 1463578, Let's Take a walk on the Calendar / Date Bridge: ... - Qlik Community - 2133428, Working with Multiple Calendars) and think I have a general sense of what I'm doing to make a canonical calendar but I'm running into a conceptual blocker that I would appreciate some help with.
In my dataset, customers apply for a course, have an assessment date, and a course start date if they are successful and then end dates each step. That's 6 dates in total - application receipt and process date, assessment start and completion date, and then course start and end date. During the course, there are regular reviews that are each associated with a single course record. Thus the course to review relationship is a one to many.
I am relatively confident in creating the canonical date for each of the start dates but two stumbling blocks I'm hitting are:
Hopefully the above make sense but if any further information is required, please do shout! Appreciate any support anyone can provide.
Thanks in advance!
Hi, it would be much better if you can share a snapshot of your data model and script you are trying to implement.
Based on your description:
You can find a downloadable example of how to handle multiple dates here:
https://qlikviewcookbook.com/recipes/download-info/tutorial-using-common-date-dimensions/
-Rob
Hi Rob,
Thank you for this! Really helpful regarding my second point. I think, if my understanding is correct, the guidance basically says the ID in the calendar needs to act as the link to all the dates. I think I realise what I am trying to do is have a couple of IDs to link to the date calendar. However this runs into the same problem as my first point: synthetic keys.
Do you know if there is similar resource for when you have multiple dates in the same table? Or how to avoid the synth key issue? I recognise I could be trying an incorrect approach so I welcome any correction there too!
I could imagine to skip the canonical-approach and further/other bridge-tables and just using a single date within an appropriate transformed fact-table. This follows the idea that there is always only a single date - one for each step on the journey from the start to the end - the dates are differentiating only to (n) states and/or key-fields.
Therefore I would concatenate all dates/events into separate records within the fact-table, like:
| ID | Category | Date | DateType |
with n load-statements against the source-tables to extract the relevant information. Afterwards the records would be sorted, numbered, counted ... maybe also extended to from-to against the relevant predator, their offsets calculated, clustered, scored ... maybe extended to further intervalmatch-stuff and so on ...
Such logic creates a rather small and long table - whereby the usually created canonical/bridge tables are seldom shorter and are needing the same efforts - without going this detour else doing it at the beginning in the right place respectively getting a clean star-scheme without all the trouble to link multiple facts with any bridges.