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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
dieterbe_vdb
Frequent Visitor

Table visual showing records that shouldn't be there

Hello, I have a data model with three tables: Parent, Child (link to Parent via e one to many relation) and Grandchild (linked to Child via a one to many  relation).

dieterbe_vdb_0-1661927306658.png


Parent table:

dieterbe_vdb_1-1661927317385.png


Child table:

 

dieterbe_vdb_2-1661927328489.png

 

Grandchild table: 

 

dieterbe_vdb_3-1661927343803.png

 



I want to visualize all combinations of Parents and Childs + number of GrandChilds (from the perspective of the Parent).
Measure I'm using: 

#Grandchild = COUNTROWS(tblGrandChild) + 0
I've added the + 0 as I also want to show the Parent/Child combinations who don't have a grandchild.

dieterbe_vdb_4-1661927409674.png

 



I notice that this works, however, in my visual (a Table) I also see Parent/Child combinations which aren't possible?  How come that in this case the relation between Parent and Child doesn't "work" => parent A isn't linked with child B and C so why is this combination shown?

How can that for example
2 REPLIES 2
amitchandak
Super User
Super User

@dieterbe_vdb , Using power query merge add parent Id to Grandchild  table and then join it with parent and child directly, then +0 should work better

Merge: https://radacad.com/append-vs-merge-in-power-bi-and-power-query

 

Should be very similar to Power BI Items/Categories not sold to the customers: https://youtu.be/AbuKvAnicwo

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Many thanks for your answer!

I agree that joining tables will do the job.

My question remains: why isn't the relationship / filter working in my example => so why does PowerBI shows combinations which aren't possible at all? It is known (from the relations) that child BA can't be a child of parent A => how can I avoid Power BI to show this combination in my table (supposing that I'm working with different tables and relationships between these tables)?

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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