Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
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,C,E,F value, i don't have any shipping. I have parent column for those to fetch shipping.
my ID table is connected to shipping table on ID-ID 1on1 relationship. 2nd inactive relationship is Parent-ID that is many to one.
I used below measure to fetch shipping based on parent:
I can achieve this with a calculated column on table. But I want to figure out what is the issue with measures
Solved! Go to Solution.
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.
@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 😞
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.
This worked. Thank you 🙂
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 23 | |
| 19 | |
| 18 | |
| 17 | |
| 13 |
| User | Count |
|---|---|
| 60 | |
| 52 | |
| 47 | |
| 40 | |
| 38 |