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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
EWBWEBB
Helper III
Helper III

Filtering with inactive relationships

I have a Dim_Location table which contains the Cost_Code of each business area.

I have a Fact_InternalChange table which contains the Cost_Code a person is moving from and to.

 

Dim_location is joined to Fact_InternalChange on 'From_CostCode' with an active 1-* relationship

Dim_Location is joined to Fact_InternalChange on 'To_CostCode' with and Inactive 1-* relationship

 

What I would like to be able to do is add a slicer so that a person can filter the Fact_InternalChange by either From_CostCode OR To_CostCode without the need to introduce a second Dimensions table.

 

I've seen a few things on the forum but not from this specific angle.

 

EWBWEBB_0-1719930852122.png

 

 

2 REPLIES 2
amitchandak
Super User
Super User

@EWBWEBB , if you want to filter the same values, then the single table(Inactive join), and userelationship can help

 

Example activate inactive join

 

calculate( SUM(Sales[Sales Amount]),USERELATIONSHIP ('Sales'[CreateDate], 'Date'[Date]))

 

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

 

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak 

 

I'm not sure I understand this approach.....potentially me being simple and highly likely a bad explanation.

 

I want to put the department from the Dim_Location table into Slicer1 so a person can slice the Fact_InternalChange table by the from department THEN put department into Slicer2 so they can filter by To department. 

 

This is all based on the cost code.

I'll likely use, USERELATIONSHIP to populate the data into the visual as a measure but I can't work out how to use it to affect the interaction of a slicer.

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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