I am hoping for some assistance with data modelling. I have created a sample database to show my problem.
https://1drv.ms/u/s!Ap6q8W-mvm27hKRL1J85BopnnrfYRQ?e=tgASW4
Essentially I have a client and date calendar as dimension tables. The client has 'episodes' each with a start and end date. They can have multiple episodes. I have assumed this is the FACT table as I will mainly be measuring events at the end date of an episode.
I have several further dimension tables, all with rows with starts and end dates. Again, a client can have multiple rows in each table.
My measures will select the relevant values from these tables where the record is 'open' on the end date of the episode. I will then produce calculations on these.
The attached is just a sample, in reality I have many more of these tables and a lot of data.
I would really appreciate advice on how best to model the data.
My thoughts are:
- Create a new FACT table for each of the episode to dimension tables. I assume each would need a bridge table
- Build one big fact table by merging each in turn (My application is quite slow so I worry this would take a long time to run)
- Create virtual tables combining the data I need in Dax
Is there another option that I haven't considered? I'm trying to build the most efficient and least data hungry model
Thank you
EDIT: I have created a FACT table for Episode/ Accommodation using Table.SelectRows with conditions in power query to try to reduce and simplify the merge process. On my live data it is taking much longer to load. I may continue with this approach but would appreciate if anyone has advice on a better method. New files below: