Forum Discussion
USERELATIONSHIP Issue
- Anonymous3 years ago
Hi tc_WII ,
I suggest you to try code as below to create a measure.
shipCost = VAR _VALUE1 = CALCULATE ( MAX ( tbShipping[Shipping] ) ) RETURN IF ( ISBLANK ( _VALUE1 ), CALCULATE ( MAX ( tbShipping[Shipping] ), FILTER ( ALL ( tbShipping ), tbShipping[ID] = MAX ( tbID[Parent] ) ) ), _VALUE1 )Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
tc_WII , Try like
shipCost=
CALCULATE(MAX(tbShipping[Shipping]),
USERELATIONSHIP(tbShipping[ID],tbID[Parent]))
Worked for me, file is attached after signature
I used the same measure, but it did not work in my model. The only difference on your data model is, both of your relationship is one-to-many. but i used id-id as one to one, only because tbID[ID] is also unique value. Because of that one-to-one, my measure is not grabbing the result 😞
- Anonymous3 years agoNot applicable
Hi tc_WII ,
I suggest you to try code as below to create a measure.
shipCost = VAR _VALUE1 = CALCULATE ( MAX ( tbShipping[Shipping] ) ) RETURN IF ( ISBLANK ( _VALUE1 ), CALCULATE ( MAX ( tbShipping[Shipping] ), FILTER ( ALL ( tbShipping ), tbShipping[ID] = MAX ( tbID[Parent] ) ) ), _VALUE1 )Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- tc_WII3 years agoFrequent Visitor
This worked. Thank you 🙂