Forum Discussion
rehtdats
3 years agoRegular 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: I want to be abl...
ValtteriN
Community Champion
3 years agoHi,
Here is one way to do this:
Data:
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:
Apply the filter measure like this:
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))
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
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/
rehtdats
3 years agoRegular Visitor
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%.