Forum Discussion
Same Dimensions, multiple Fact tables, different measures, millions of rows
- 3 years ago
I think you've got exactly the right idea! Give it a go. Every data model is different but for example a normal pattern I use in education has a number of fact tables will shared dimensions:
We often use measures that require calculations from more than one table!
Hello Ben,
Thank you for your help !
The fact tables contains data on respectively what was delivered and what was invoiced. Data is on client, product and daily level.
I might be able to lower the number of conformed dimensions by using snowflake schema, but I'd like to avoid that as
(1) I saw several articles explaining that Power BI is more favorable performance wise to Star then to Snowflake schema,
(2) dimensions might not be as conformed as they appear ( for example a client might have received its goods at day X, but it will be invoiced on day X+Y, and such small details that at the create difference).
(3) Also most of the dimensions are actually snowflakes of the client dimension. So I prefer to keep the FKs of the snowflakes as separated dimensions and try to compensate with the ETL when/if possible instead of relying on how up to date a possible client dimensions could be ( the fact tables are coming from two different cubes, so even if the dimensions are conformed and the same, I can never be sure that they are both synced at the same time)
If I draw an overall simplified schema, what I guess I should go for is something like this?
Of course at later moment, it might appear that even if the dimensions in the two fact tables/cubes are the same, they are maintained differently, and thus I need to maintain two sets of same dimensions. However today, the assumption is that they are the same, so what I currently have is one very big fat Fact table ( that I'd like to dismantle)
The ETL tool takes 30minutes Today to make the join of the two fact tables and it will be over 1,5h when I have 24 periods instead of 8.
Any additional advice(s) you might have will be greatly appretiated.
Best regards,
Pavel
The diagram you provide with the two fact tables and 3 dimensions is exactly the way to go. Certainly try and avoid snowflakes.
What are you worried about not working in that setup?