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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
ValeriaBreve
Post Patron
Post Patron

Understanding One to many relationship?

Hello

sorry for the probably veyr basic question, but I can't figure out this one.

I have 2 tables in powerBI, both containing the column "Item" through which they are related through a one to many relationship. See snapshot below.

When I create a table visual using the firts table (Item, Amount) and add then "Comment" from the second table, PowerBI filters out all items that have no comments at all instead of leaving them in with the associated quantity and comments blank.

 

How can I get t this second behaviour? Combine the 2 tables so that I have ALL items from the first table and the relevant from the related second table, with blanks where no values are present?

 

Thanks a lot for your help!

Kind regards

Valeria

 

Screenshot 2022-03-05 223432.png

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Great question, and it touches upon one of the fundamentals of how Vertipaq works. 

 

Your choice of "item" from one or the other table has a profound impact on the displayed data. If you pick it from the "dimension" table (the 1 side of the relationship) then you perform an inner join with strict filtering. If you choose to use the field from the "fact" table   (the M side)  then that is more like a left outer join.

 

By the way, the first option is preferred.  If you don't like the strictness you can check the box "show items with no data" in the columns/rows well.

View solution in original post

2 REPLIES 2
ValeriaBreve
Post Patron
Post Patron

Thanks! In my case, I need to keep all items rom the 1-side of the relationship as it contains the sales amounts. But I want to capture comments that were made on specific sales, this is why the M side does not contain all items. So a left outer join on the "M" side is not optimal for me, it should be on the 1-side.

However, believe it or not, I had never noticed the "show items with no data" button. So thanks a lot for explaining so clearly the behaviour of the filters as well as opening my eyes on this option I had overseen!!!!!!

lbendlin
Super User
Super User

Great question, and it touches upon one of the fundamentals of how Vertipaq works. 

 

Your choice of "item" from one or the other table has a profound impact on the displayed data. If you pick it from the "dimension" table (the 1 side of the relationship) then you perform an inner join with strict filtering. If you choose to use the field from the "fact" table   (the M side)  then that is more like a left outer join.

 

By the way, the first option is preferred.  If you don't like the strictness you can check the box "show items with no data" in the columns/rows well.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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