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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
rehtdats
Regular Visitor

Filter Parent based on child selection

Hello,

 

I have an interesting problem I'm trying to set up a visual for and I can't quite get the filter set up correctly. We have a data structure that looks like this:

Untitled1.png

 

I want to be able to select any of the child values via a filter but filter the parents that contain that child. So, for example, if I select Child "A" it would apply a filter like this:

Untitled2.png

 

From that I want to create a visual that would look something like this:

Untitled3.png

 

Any help would be greatly appreciated, thanks!

2 REPLIES 2
ValtteriN
Super User
Super User

Hi,

Here is one way to do this:

Data:

ValtteriN_2-1663348532630.png

 



Dax:

Parent Filter Measure =
var _child = MAX('Table'[Child]) return
IF(COUNTROWS(FILTER('Table','Table'[Child]=_child))>0,1,0)

Apply the filter measure like this:

ValtteriN_0-1663348487072.pngValtteriN_1-1663348503654.png

For the result table you can utilize similar logic for example:

Count child =
var _child = MAX('Table'[Child]) return

COUNTROWS(FILTER(ALL('Table'),'Table'[Child]=_child))

ValtteriN_3-1663348794362.png

 

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thanks @ValtteriN,

 

I have sucessfully been able to get the child counts a number of different ways, but I'm still struggling to get that overall parent count along with the "rate" is ultimately what I'm trying to get. No matter how I slice it the parent counts keep aligning with the child counts and all the rates are 100%.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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