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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
KevinGesquiere
Frequent Visitor

Related parent of selected value in slicer

I have a slicer on page 1 which usage is a report filter and the items showing here are the parents. On page 2 I also have a slicer with the children items of the selected parent on page 1. I want to create a measure which is showing me the parent(s) of the selected child(ren) together with the selected items of slicer 2. 

 

If the user first filters the category on page 1, then goes to page 2 and filters the desired products I can create a measure in the form of "Filtered on Cat1 - Products Prod1, Prod2, Prod3"

 

But if the user first goes to the page 2 and filters some products, I can't figure out how to get the parent(s). There is a relationship between those two. The measure should then be: "Filter on Cat1, Cat3 - Products Prod1, Prod5". Is this possible?

Thanks

1 ACCEPTED SOLUTION

you need to change the cross filter direction to 'Both' from 'Single'
right now Category propagates filter to SubCategory, but not the other way round



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

View solution in original post

3 REPLIES 3
Stachu
Community Champion
Community Champion

this should work:

FiltersApplied=
"Filter on " & CONCATENATEX ( VALUES ( Table1[Cat1] ), [Cat1], ", " )
    & " Products "
    & CONCATENATEX ( VALUES ( Table1[Cat2] ), [Cat2], ", " )


Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

 @Stachu thanks for your post.

 

The problem here is all the values from the parent are shown in the measure, which is not want I wanted.

Let me explain a bit more with an example on the AdventureWorks db. 

- Page 1: slicer with the ProductCategory names

- Page 2: slicer with the ProductSubCategory names

- Slicer on page 1 will sync with with the other pages. 

 

FiltersApplied = 
VAR ISCATEGORYFILTERED = (ISFILTERED('Production ProductCategory'[Name])) 
VAR ISSUBCATEGORYFILTERED = (ISFILTERED('Production ProductSubcategory'[Name]))
RETURN
IF (ISCATEGORYFILTERED = FALSE() && ISSUBCATEGORYFILTERED = FALSE(); "No filters applied";
    IF(ISCATEGORYFILTERED = TRUE() && ISSUBCATEGORYFILTERED = FALSE(); "Filter on: " & CONCATENATEX( VALUES( 'Production ProductCategory'[Name]); 'Production ProductCategory'[Name]; ",");
        IF(ISSUBCATEGORYFILTERED = TRUE();"Filter on: " & CONCATENATEX(VALUES('Production ProductCategory'[Name]);'Production ProductCategory'[Name];",") & " Products " & CONCATENATEX(VALUES('Production ProductSubcategory'[Name]); 'Production ProductSubcategory'[Name];","))))

In case no filters are applied; I get the text: "No filters applied". -> OK

In case filter is applied only on page 1; I get : "Filter on Bikes, Accessories" -> OK

In case filter is only applied on page 2; I get : "Filter on Bikes, Components, Clothing, Accessories, Products: Brakes". -> NOK.

In the last case I should "Filter on Components - Products: Brakes" but not all the available categories. 

 

I don't find a solution how to get the parents name of a selected child... 

 

 

 

you need to change the cross filter direction to 'Both' from 'Single'
right now Category propagates filter to SubCategory, but not the other way round



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors