cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
draner Frequent Visitor
Frequent Visitor

Get value from non related table

Hi everybody,

 

I have a new problem with DAX Smiley Happy

 

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

Accepted Solutions
Community Support Team
Community Support Team

Re: Get value from non related table

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 Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |
2 REPLIES 2
Datatouille Established Member
Established Member

Re: Get value from non related table

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.

 

 

Community Support Team
Community Support Team

Re: Get value from non related table

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 Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |