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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
draner
Frequent Visitor

Get value from non related table

Hi everybody,

 

I have a new problem with DAX 🙂

 

I have three table :

affect (idAffect, idProject, idTask, ...)

Project(idProject, ...)

Task(idProject, neededValue)

 

I have two relations beetween tables:

affect(idProject) <=> project(idProject)

task(idProject) <=> project(idProject)

 

Now, I want to get a value "neededValue" from task to affect.

But I can't enable an active relation without create ambiguity.

 

How I can get value "neededValue" in affect ?

 

best regard

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

Hi @draner,

 

According to your description, I'd like to suggest you use the lookupvalue function to search for the related value.

 

RelatedValue=Lookupvalue(task[neededValue],task[IdProject],affect[IdProject])

 

LOOKUPVALUE Function (DAX)

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @draner,

 

According to your description, I'd like to suggest you use the lookupvalue function to search for the related value.

 

RelatedValue=Lookupvalue(task[neededValue],task[IdProject],affect[IdProject])

 

LOOKUPVALUE Function (DAX)

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi,

 

Could you please be more precise ?

I guess IdTask is also in your Task Table ? (not mentionned in your list).

 

For both of your active relationships, Project ID is on the "1-side" of the relationship (Dimension tables which each row being unique), right ?

Can the ID project be repeated in Task and/or Affect Table?

And last, what do you want to have in your pivot ?

 

Depending on your answer you will probably either need:

(i) to use a Bridge Table because of a "Many-To-Many" relationships

(ii) to use "UseRelationship" function which allows you to use an inactive relationship locally in a measure.

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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