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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
AndyM2023
New Member

Get text values to display using an inactive relationship

Hello

 

I'm very new to Power Bi and was wondering if anyone could help with a query I have around table relationships.

 

So I have three tables:

 

CONTACT   OPPORTUNITY      USER
Contact Id     Opportunity Owner ID   User ID
Contact Name   Opportunity Contact ID   User Name
Contact Email Opportunity Name     User Email

 

 

I have an active relationship between Contact > Contact ID and Opportunity > Opportunity Contact ID. (many to one)

There is an inactive relationship between User > User ID and Opportunity > Opportunity Owner ID (one to many)

The USER table also has an active relationship to a different table.

 

I'm trying to put together a table that will look something like this:

 

OPPORTUNITY NAMECONTACT NAMECONTACT EMAILOWNER (USER) EMAIL
Opp 1John DoeJ.D@company1.come.fudd@acme.inc
Opp 2Joe BloggsJ.B@company1.come.fudd@acme.inc
Opp 3Jane DoeJaneD@Company2.co.ukb.wayne@acme.inc

 

I'm having trouble pulling the User Email because there's no relationship available. I read you can use USERELATIONSHIP to use an inactive relationship, but this won't display the values as it has to be used in a CALCULATE function.

 

I've tried a couple of forum posts around this (using stuff like COUNT, MAX, etc) but they don't seem to work and just generates an error around multiple results when expecting a single result?

 

If anyone can help it would be greatly appreciated.

 

Thanks.

1 REPLY 1
rajendraongole1
Super User
Super User

Hi @AndyM2023 - as per my understanding , you can create measure in the Opportunity table to fetch the User Email from the User table.

Owner Email =
CALCULATE(
MAX(User[User Email]),
USERELATIONSHIP(Opportunity[Opportunity Owner ID], User[User ID])
)

 

it works and able to pull in the User Email for each opportunity owner, even with an inactive relationship.

 

Hope it helps

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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