Forum Discussion
jsangerman
Helper II
2 years agoCalculated column to get value from another table ignoring relationship
I have two tables: Milestone Milestone Title Finish Start 1/1/2024 Milestone1 2/1/2024 Milestone2 3/1/2024 Finish 4/1/2024 StandardMilestone StandardMilestoneTitle...
Greg_Deckler
Community Champion
2 years agojsangerman I can't seem to replicate this. See attached PBIX below signature.
jsangerman
Helper II
2 years agoTurns out I had the relationship cross-filter going in both directions. When I switch it to one direction, it works as expected.
However, when I tried the same thing on your example, it didn't work the same. The calculated column works as expected no matter the cross-filter direction. There's actually one difference I hadn't thought of, but is causing the changing behavior. My StandardMilestone table actually looks like this:
StandardMilestone
| StandardMilestoneTitle | MilestoneTitle | MilestoneSort |
| StandardStart | Start | 1 |
| StandardMilestone1 | Milestone1 | 2 |
| StandardFinish | Finish | 3 |
The relationship is MilestoneTitle --> Milestone Title, and the column formula is:
CALCULATE( MIN( 'StandardMilestone'[MilestoneSort] ), FILTER( ALL('StandardMilestone'), 'StandardMilestone'[StandardMilestoneTitle] = "StandardStart") )
I redid your file to match this: Milestones.pbix
Can you explain why it doesn't work when the cross-filtering goes in both directions?