Forum Discussion
Using a date table to filter makes it impossible to keep 1 to M relationship
- 4 years ago
Ok. So you need to create a Members dimension table.
This will be a table with a UNIQUE column of membership ID's, then any number of other columns describing that member e.g. name, address, age, customer group, etc.
You may already have something like this set up, but let me know if not and we can look at easy ways to dynamically create one from your existing data (will probably be Monday now though I'm afraid).
You then relate dimMembers[MemberID] to both factMemSubs[MemberID] and factInvoices[MemberID]. You then use values from dimMembers in your visuals and this will correctly filter both of your fact tables to select only the member(s) you want to see.
You can also relate your calendar table to factInvoices[issueDate / dueDate / paidDate] and make these relationships inactive, so you can choose via your measures which date to use depending on what you are trying to calculate.
The model structure that you are aiming for is a STAR SCHEMA.
Pete
Hello again BA_Pete
I finally have time again to look into this report. I have been reading a bit about star schemas, and watching tutorials.
I think my membership table is already a fact table. Next I take a copy of the membership table, remove all data except dates and membership ID and I have a dimension table for the dates. I can then expand the dates using the same method I used before. At that point, the link between my Membership table and the invoices should work, because I won't need a M to N relationship anymore. I should be able to use the dates as slicer again to filter my reports.
I will start working on this now. Thanks for your help!
Ben.