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
lockartpt
Regular Visitor

Relationship Issue

Hi,

 

I have 2 tables (Table 1 with "Period start time" and table 2 with exact the same column name)

The dates from Table 1 start from 1-10-2021 00:00 (dd-mm-yyyy hh:mm) to 14-10-2021 12:00. The dates from Table 2 start from 8-10-2021 00:00 to 14-10-2021 23:00.

 

When I load the tables into power BI the 1st thing that I notice is that no relationship is detected (i'm not sure why) Is this due to the fact that both columns dont start and end with the same dates?

 

Next I manulally create a relation between these 2 columns (many to many on both directions). when I put both of the columns in a table element something strange happens:

lockartpt_0-1634486172858.png

Both of them have the "show items with no data active". And both of them are Date/Time format. What I found strange is that the values from the 2nd column should only start to appear when the 1st column reaches 08-10-2021 and that does not happen. Should't powerBI be able to correctly compare both date/time values?

Do you have any ideia why this is happening?

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey @lockartpt ,

 

maybe the Auto-detect option is turned off, check your settings:

image.png

A relationship of cardinality Many-to-many means that each value of one column will be combined with each value from the other column.

Consider setting the filter direction in the setting of the relationship.

 

Here you will find an introduction to the concept of the star schema and its importance for Power BI datasets: Understand star schema and the importance for Power BI - Power BI | Microsoft Docs

Here you will find a more in-depth tutorial to data modeling in Power BI: Model data in Power BI - Learn | Microsoft Docs

 

Hopefully, this provides some help to tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Hi  @lockartpt ,

I created the data, but your scenario cannot be reproduced. The data in the two columns will be displayed with the correct date.

vyangliumsft_0-1634799699534.png

Or you try to set the relationship as one-to-one.

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

TomMartens
Super User
Super User

Hey @lockartpt ,

 

maybe the Auto-detect option is turned off, check your settings:

image.png

A relationship of cardinality Many-to-many means that each value of one column will be combined with each value from the other column.

Consider setting the filter direction in the setting of the relationship.

 

Here you will find an introduction to the concept of the star schema and its importance for Power BI datasets: Understand star schema and the importance for Power BI - Power BI | Microsoft Docs

Here you will find a more in-depth tutorial to data modeling in Power BI: Model data in Power BI - Learn | Microsoft Docs

 

Hopefully, this provides some help to tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

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.