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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
KylieF
Regular Visitor

How to use inactive relationship for cascade slicers

Hi there, 

 

I want to make cascade slicers but the relationship of the two columns is inactive because of ambiguity introduced by another table. How to enable the cascade slicers?

 

Situation explained: I have 3 tables:

1. DimCompany

KylieF_2-1722561898802.png

2. DimCampus

KylieF_1-1722561862678.png

3. DimStudent

KylieF_3-1722561955891.png

My data model is:

KylieF_0-1722561814229.png

The relationship between DimCampus[CompanyKey] and DimCompany[CompanyKey] is inactive because both [CompanyKey] and [CampusKey] are present in DimStudent.

 

The report is:

KylieF_4-1722562178266.png

I want the two slicers CompanyName and CampusName to be cascade to each other. I'd appreciate anyone provide hints or solutions!

 

1 ACCEPTED SOLUTION
v-yilong-msft
Community Support
Community Support

Hi @KylieF ,

I create three tables as you mentioned.

vyilongmsft_0-1722825071468.png

vyilongmsft_1-1722825212635.png

vyilongmsft_2-1722825240887.png

Then I create a new table and here is the DAX code.

BridgeTable = 
DISTINCT(
    UNION(
        SELECTCOLUMNS(DimStudent, "CompanyKey", DimStudent[CompanyKey], "CampusKey", DimStudent[CompusKey]),
        SELECTCOLUMNS(DimCampus, "CompanyKey", DimCampus[CompanyKey], "CampusKey", DimCampus[CompusKey])
    )
)

I also create two relationships between them.

vyilongmsft_3-1722825442021.png

Finally you will get what you want.

vyilongmsft_4-1722826017187.png

 

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yilong-msft
Community Support
Community Support

Hi @KylieF ,

I create three tables as you mentioned.

vyilongmsft_0-1722825071468.png

vyilongmsft_1-1722825212635.png

vyilongmsft_2-1722825240887.png

Then I create a new table and here is the DAX code.

BridgeTable = 
DISTINCT(
    UNION(
        SELECTCOLUMNS(DimStudent, "CompanyKey", DimStudent[CompanyKey], "CampusKey", DimStudent[CompusKey]),
        SELECTCOLUMNS(DimCampus, "CompanyKey", DimCampus[CompanyKey], "CampusKey", DimCampus[CompusKey])
    )
)

I also create two relationships between them.

vyilongmsft_3-1722825442021.png

Finally you will get what you want.

vyilongmsft_4-1722826017187.png

 

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

KylieF
Regular Visitor

What I've learned is that setting it to bidirection is not a good practice because it might yield undesired results. We should always avoid using it. Any other solutions? 

You could create calculated columns in your DimStudent table for both CompanyName and CampusName and then use those in your slicers.

Company Name = RELATED('DimCompany'[CompanyName]) 
aduguid
Super User
Super User

If you change the cross-filter direction of both of the active relationships from "Single" to "Both", that should work.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.