Forum Discussion

tc_WII's avatar
tc_WII
Frequent Visitor
3 years ago
Solved

USERELATIONSHIP Issue

Hello, I have 2 tables. ID Table: ID Price Parent A 25   B 29 A C 30 A D 41   E 42 D F 43 D   shippingTable: ID Shipping A 3 D 5   For B...
  • Anonymous's avatar
    Anonymous
    3 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 Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.