Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.
Member
Posts: 87
Registered: ‎05-25-2016
One to many, one to one???.. What must I use with dates?

Hello, eveybody

 

I have a data model with two tables.

 

First table is the calendar where every row contains a date of the calendar. Obviusly, same date doesn't repeat in another row.

 

The other table contains sales and there is another field for date. In this case, date can be repeated in different rows.

 

I have created a relationship between these two fields. But I don't know which type of relationship must choose. (one-to-one, one-to-many,many-to-one)??

 

Thanks,

 

Highlighted
Regular Visitor
Posts: 49
Registered: ‎08-02-2016
Re: One to many, one to one???.. What must I use with dates?

Hi,

You should do a  1:n (one to many) relationship from your date field in the calendar table to the date field in the sales table.

Best,

Sascha

Member
Posts: 87
Registered: ‎05-25-2016
Re: One to many, one to one???.. What must I use with dates?

Thank you!!!!!!

Frequent Visitor
Posts: 16
Registered: ‎02-15-2016
Re: One to many, one to one???.. What must I use with dates?

Hi

 

One to Many

 

Cheers

 

David

 

Regular Visitor
Posts: 47
Registered: ‎03-08-2016
Re: One to many, one to one???.. What must I use with dates?
Hi,

If you use the table view and drag and drop the fields between to tables, Power BI usually sets the join type for you. You can double click on the join line to check and modify the join properties at any time.
Member
Posts: 87
Registered: ‎05-25-2016
Re: One to many, one to one???.. What must I use with dates?

Thank you, @GarryFarrell

 

The problem was when I use the table view, the relationship sets the join one to one... Sure It was something unusual!!!!

 

 

Frequent Visitor
Posts: 14
Registered: ‎07-12-2015
Re: One to many, one to one???.. What must I use with dates?
[ Edited ]

It's because you probably didn't have lots of data in your tables or possibly you didn't have any data at all. One thing that Power BI looks at to detect the relationships is the tables' data. So if , for instance, you have one sales row in your Sales table per for Order Date, then Power BI detect a One-to-One relationship between those two tables.
But, you can always modify the relationships.

Member
Posts: 87
Registered: ‎05-25-2016
Re: One to many, one to one???.. What must I use with dates?

That the thing I was suppossed, too..