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
Anonymous
Not applicable

Child and parent filter

My requirement is I have Main table that is below and Imported into Power BI made table visual and taken Child field as a slicer and when choose any Child filed please see My requirement

Main table

ChildParent
AAA1
BBB1
CCC1
AAA2
DDD2
FFF2
BBB3
CCC3
DDD3
FFF3
AAA4
FFF4
GGG4
SSS4

 

My requirement

If i select AAA then display like

ChildParent
AAA1
BBB1
CCC1
AAA2
DDD2
FFF2
AAA4
FFF4
GGG4
SSS4

 

 

Please help me on this

thank you in advance 

 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@Anonymous 

You can achieve this by creating a separate disconnected table for the Child column.

You can download the file: HERE

 

Measure = 

var __childselected = SELECTEDVALUE('Child Table'[Child])
var __table = 
    CALCULATETABLE( 
        'Main Table',
        'Main Table'[Child] = __childselected 
    )
return
ISEMPTY(__table) * 1

Fowmy_0-1606580333670.png

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

6 REPLIES 6
Fowmy
Super User
Super User

@Anonymous 

You can achieve this by creating a separate disconnected table for the Child column.

You can download the file: HERE

 

Measure = 

var __childselected = SELECTEDVALUE('Child Table'[Child])
var __table = 
    CALCULATETABLE( 
        'Main Table',
        'Main Table'[Child] = __childselected 
    )
return
ISEMPTY(__table) * 1

Fowmy_0-1606580333670.png

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Krista
Frequent Visitor

@Fowmy -- I've run into this same issue and I think your solution will work, but I can't access the file you linked to. I've created the separate table and measure, but I'm not sure where to go from there. Which table is the measure supposed to be created in? From which table do I use the Child field for the slicer?

 

Thanks!!

Anonymous
Not applicable

Working great Thank you @Fowmy 

Anonymous
Not applicable

 

When I select CCC

 

ChildParent
AAA1
BBB1
CCC1
BBB3
CCC3
DDD3
FFF3

 

AntrikshSharma
Community Champion
Community Champion

@Anonymous I am not being rude, but you haven't even written a single full sentence, how would someone understand what you are trying to achieve? 🙂

Anonymous
Not applicable

@AntrikshSharma 

 

Sorry for that just now updated with clear note 

Thank you 🙂

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.

Top Solution Authors