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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello everyone,
I created a test simulation with two simple tables (+ two "bridge" table):
As you can see there are two common fields (Brand and Customer) + field "Bonus type" that is available only in sheet 1.
Here is my problem:
In my example I have, for brand "M" and customer "a", total bonus value of 100 (50 bonus type "A" and 50 bonus type "B") and turnover value of 99.
The system doesn't know how to allocate my turnover value between bonus type A and B and so I get the error "Can't determine relationship", but I would like to see in both case the total amount of turnover, like this:
In Excel this would be easy, is this also possible in PowerBI?
Thanks a lot!!!
Solved! Go to Solution.
How about merging (joining) the two tables in the Query Editor?
Hi @HitcH ,
I have a test by your data model, I think it works well on myside.
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.
Don't use SUM to summarize your bonus and turnover. Try:
Total Bonus =
VAR _Unique_Table= SUMMARIZE('Test Table','Test Table'[Brand],'Test Table'[Customer], "@Bonus",MAX('Test Table'[Bonus]))
RETURN
SUMX(_Unique_Table, MAX([@Bonus]))
Another big "thanks" and another step ahead. But also another question:
Customer "a" and brand "M" has a total amount of bonus of 100 + brand "N" with extra 50. So the total "a" should be 150 and the total "a/M" should be 100:
Is there a problem with the formula?
Try the equivalent of:
Total Bonus =
VAR _Unique_Table=
SUMMARIZE('Test Table',
'Test Table'[Brand],
'Test Table'[Customer],
"@Bonus",SUM('Test Table'[Bonus])
)
RETURN
SUMX(
_Unique_Table,
MAX([@Bonus])
)
I've changed the summary in SUMMERIZE to SUM.
How about merging (joining) the two tables in the Query Editor?
Hi rbriga.
First of all thanks for your support!
I didn't even know the merge function, but I studied and implemented it, with partial success:
The two rows with the green note are fine, but the total for combination customer "a" and brand "M" is wrong, as the turnover is doubled.
Do you also know how to handle this?