Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi everyone,
I'm trying to calcualte the ratio between two sums. My dataset is built as follows:
I need to calculate, for each SO, the ratio between the shipping cost and the total value of the order, but I'm having trouble doing so.
Can you help me? I can share my initial solution nut it doesn't work at all.
Thanks!
Solved! Go to Solution.
Hi @Anonymous ,
Here I create a sample to have a test.
Table1:
Table2:
DimSo:
DimSO = VALUES(Table2[Sales Orders])
Relationship:
Measure:
Rate =
VAR _RelativeAmount = CALCULATE(SUM(Table2[Relative Amount]))
VAR _ShippingCost = CALCULATE(SUM(Table1[Shipping Cost]))
RETURN
DIVIDE(_RelativeAmount - _ShippingCost,_ShippingCost)
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.
Hi @Anonymous ,
Here I create a sample to have a test.
Table1:
Table2:
DimSo:
DimSO = VALUES(Table2[Sales Orders])
Relationship:
Measure:
Rate =
VAR _RelativeAmount = CALCULATE(SUM(Table2[Relative Amount]))
VAR _ShippingCost = CALCULATE(SUM(Table1[Shipping Cost]))
RETURN
DIVIDE(_RelativeAmount - _ShippingCost,_ShippingCost)
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.
@Anonymous , You can have a new column
New column in SO
Sumx(filter( Fulfillments , Fulfillments [So] = SalesOrder[SO]), Fulfillments [Qty])
refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 8 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 23 | |
| 16 | |
| 15 | |
| 14 | |
| 8 |