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 kazuma6666 ,
Can you share a screen shot or an example of the structure and types of data in your invoice table please?
It just sounds like you need a member dimension table, so shouldn't be too difficult to get this fixed up for you.
Pete
- kazuma66664 years agoHelper II
Hello again BA_Pete!
Thanks for looking into this too 🙂
Here is a screenshot of the invoices table in PBI:
_si_membershipid_value is the key in the membership table. That is the link to it.
Please let me know if you need any more information.
- BA_Pete4 years agoSuper User
Cool. And which field was related to your memberships table? Was it on [_si_membershipid_value]?
Pete
- kazuma66664 years agoHelper II
Yes, [_si_membershipid_value] is related to the membership table.