Forum Discussion
Help on my star schema
Thanks for your answer. Actually i made a small modification to my schema, here is the final version :
Does it look more like a star schema right now ?
Also i've created the schema in power bi desktop. And i can't create two active relationship between date table and the two fact table. Only one would be active and one inactive (dotted line). This is a normal behaviour ? And this is where USERELATIONSHIP() comes in ?
As the FAIT_FACTURE table is the central fact table of my model, the relation that has to be active is the one between FAIT_FACTURE and the calendar table ? All other relations between fact table and time table are secondary ?
Sorry for all the questions and thanks again.
Anonymous,
It's still a snowflake schema. In a star schema, dimension tables don't have relationships with other dimension tables. These three tables would be merged into one table at the product grain, with a column for each product attribute:
The date table needs only one relationship with each fact table.
- Anonymous2 years agoNot applicable
DataInsightsthanks.
When you say "The date table needs only one relationship with each fact table.", you mean one "active" relationship with each fact table ?
For the schema itself, and the snowflake part, should i merged everything ? A product can be in multiple categories so if i merge everything, i can have multiple line with the same product (but different category) in that new table. Is this a problem ?
Thanks again for your answers
- DataInsights2 years ago
Super User
Anonymous,
Yes, one active relationship between the date table and each fact table.
Would you be able to provide sample data for the product and category tables, as well as the relevant fact table?
- Anonymous2 years agoNot applicable
DataInsights thanks.
But PowerBi won't let me have two (or more) active relationships between the date table and two (or more) fact tables.
I can only have one active relationship.
After setting up the first active relationship between FAIT_FACTURE and the date table, if i try to set a second relationship between the other fact table (FAIT_REGLEMENT) and the date table, the relationship goes straight to inactive mode (dotted line) and if i try to make it active, PowerBi tell me that it is not possible because of the other relationship already in place (and already active).
What do you mean by "the relevant fact table" ?
I have a pbix sample to share but when i drag and drop the file here, it says "the file type .pbix is not supported".We are on the Power Bi forum right ?
Thanks anyway for your help