Forum Discussion
LeoST
5 years agoFrequent Visitor
Switching between two relationships between two tables
Hello, I've two tables that are conneted by two relations. One table is costs and the other is Projects. They have an active relation based on there ID columns and an inactive relation between C...
- 5 years ago
LeoST , Try like
Measure =
CALCULATE(
FIRSTNONBLANK(Projects[Name],TRUE()),
USERELATIONSHIP(Costs[Source ID], Projects[ID]))Not need crossfilter
refeR: https://youtu.be/e6Y-l_JtCq4
CNENFRNL
5 years agoCommunity Champion
Hi, LeoST , you might want to try this measure
Measure =
VAR __id = MAX ( Costs[Source ID] )
VAR __name = LOOKUPVALUE ( Projects[Name], Projects[ID], __id )
RETURN
__nameAnonymous
5 years agoNot applicable
Hi CNENFRNL
LOOKUPVALUE is a very slow function and should be use only when there's absolutely no other way to get what you want (there are situations like this but they are far and between). It's much better to use TREATAS in this case with a suitable expression. On top of that, there should be no value for the Total row if there is more than 1 row selected since "Project D" makes no sense in the above screenshot.