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
No worries. Give me ping on here Monday if you have any questions.
In the meantime, here's a bit of weekend reading for you 🙂
https://docs.microsoft.com/en-us/power-bi/guidance/star-schema
Have a good one
Pete
Hello BA_Pete
I haven't been able to work on this project this week, but I'll let you know as soon as I have more time to look into it. I'm having issues with stuff in production which is of course a priority.
Thanks for all your answers 🙂