Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
DebbieE
Community Champion
Community Champion

Power BI Data Modelling Fact to Dim one to one relationship

I am trying to make sure I do my models right

 

I had a flat file of Events and I split this up into a Fact table and a dimension. this created a one to one relationship and I got the following 

OnetoOne.JPG

The relationship is Cross filter direction Both and you cant change it against one to one.

I have been told that they should be single direction where possible.  I can change it to 1 to Many to get the single cross filter direction correct

OnetoMany.JPG

But that wouldnt be true. it will always be one to one in this instance. Basically am I doing anything wrong here? and should I leave it as one to one Both Directions, or should it be changed to one to many so the Event can filter the metrics in the fact table single direction

 

Any help would be appreciated. im really trying to get my head round the modelling side

3 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@DebbieE , you can leave it one to one both directionss, if you do not planning join the dim event with other tables. if yes then prefer to have one to many

View solution in original post

Hi Debbie,

 

You could bring the event title data into the fact table (since it is a one to one match) and not have a dim/fact setup. If you have a one-to-one match there is no real need for the dimension and filtering the fact table directly can be the best method. See this link below.

 

https://docs.microsoft.com/en-us/power-bi/guidance/relationships-one-to-one

 

Kris

View solution in original post

Yes, there's nothing wrong with the setup you have implemented there if you want to keep your model understandable by seperating the factual items from the descriptive. And yes it's the degenerate dimension philosophy 🙂. Just be careful that when you add more tables to the model that the relationships do not make the model ambiguous.

 

Side note - Checked model I had with DAX Studio and whether I had a relationship set 1:1 with bi-directional or "fake" 1:M with one directional didn't seem to change the calculation logic or efficiency using simple measures.

View solution in original post

6 REPLIES 6
amitchandak
Super User
Super User

@DebbieE , you can leave it one to one both directionss, if you do not planning join the dim event with other tables. if yes then prefer to have one to many

When you say 'if you are not planning join the dim event with other tables' do you mean add a snowflake dimension joined to the event dim?

 

I am wanting to understand what the actual reason is why the one to one would only allow me to filter both directions considering I want to filter the measure table

Hi Debbie,

 

You could bring the event title data into the fact table (since it is a one to one match) and not have a dim/fact setup. If you have a one-to-one match there is no real need for the dimension and filtering the fact table directly can be the best method. See this link below.

 

https://docs.microsoft.com/en-us/power-bi/guidance/relationships-one-to-one

 

Kris

I do agree, however, its simply to adhere to the modelling rules where you have your facts in one table and your descriptive information in another. 

 

thanks for the info. from this it seems like I have created a degenerate dimension.  I am guessing that there is nothing wrong for going with the metrics and descriptive data split because its mentioned here?

 

Otherwise you would be heading towards a flat file solution and I dont want to go there

Yes, there's nothing wrong with the setup you have implemented there if you want to keep your model understandable by seperating the factual items from the descriptive. And yes it's the degenerate dimension philosophy 🙂. Just be careful that when you add more tables to the model that the relationships do not make the model ambiguous.

 

Side note - Checked model I had with DAX Studio and whether I had a relationship set 1:1 with bi-directional or "fake" 1:M with one directional didn't seem to change the calculation logic or efficiency using simple measures.

I think I need to find myself a really good guide of creating star schemas for Power BI so I can brush up on it all again

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.