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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Nielf
Helper I
Helper I

Filter table visual on both active and inactive relationship

Hello, 


I have a data model like the one below, where there are two relationships between the Account table and the opportunity table. Customer (parentaccountid) is the active relationship, and the other is End Customer (sem_end_customerid) - the inactive relationship. 

 

Nielf_0-1715608540098.png

 

My end goal is to filter a table visual with opportunities, where the selected account(s) are either Customer OR End Customer in the opportunity table.  

 

I thought I had found a solution where I used the measure below, and added the measure as column to the table visual. This now shows me all the opportunities, where the Account is either Customer or End Customer. 

End Customer Filter = 

CALCULATE(
    COUNTROWS(Opportunity),
    CROSSFILTER(Account[Account], Opportunity[parentaccountid],None),
    USERELATIONSHIP(Account[Account], Opportunity[sem_end_customerid])
    )


However, the issue with this solution is, that columns from the Opportunity finance table are blank in the table visual if only the End Customer is equal to the selected Account(s). 

 

I hope you can help. 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @Nielf 

 

This is because when you drag columns from the Opportunity finance table into the table visual, it is still filtered by the default active relationship passed by the Account table and the Opportunity table. If you want to see results based on both relationships, you still need to create a similar measure to activate the inactive relationship to get corresponding results from the Opportunity finance table. Inactive relationships can only be used in measures. It cannot be passed in a visual invisibly. 

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

View solution in original post

Nielf
Helper I
Helper I

@Anonymous thanks for the swift help. That makes sense. 

View solution in original post

3 REPLIES 3
Nielf
Helper I
Helper I

@Anonymous 

It works partially for me. I have created another measure, which combines the value from the active and inactive relationship, which I can display in th table.

 

Combined sales price (base) = 

IF(ISBLANK([$ All opportunities]),
[End Customer Sales Price (Base)], [$ All opportunities])

 

 

While it works on row level in the table, the total is wrong, since only the active relationship seem to used there. Do you know if it's possible to work around this? Total should be 213.604.374.

 

Nielf_0-1716389524873.png

Nielf
Helper I
Helper I

@Anonymous thanks for the swift help. That makes sense. 

Anonymous
Not applicable

Hi @Nielf 

 

This is because when you drag columns from the Opportunity finance table into the table visual, it is still filtered by the default active relationship passed by the Account table and the Opportunity table. If you want to see results based on both relationships, you still need to create a similar measure to activate the inactive relationship to get corresponding results from the Opportunity finance table. Inactive relationships can only be used in measures. It cannot be passed in a visual invisibly. 

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.