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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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 Kudoed Authors