Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
guybrit
New Member

Create a Relationship Error

Hello,

 

I'm trying to sum the total points from 2 different data sources. Base points + Bonus points. The issue is some Buyers have base points but no bonus points (they don't show up as 0 if they have no points - they just don't appear in the data), some have no base points but have bonus points, and some have both. I tried creating a relationship between the two sources using the Buyer name, but since not all buyers are on both sources, I get errors. I'm not sure how I can sum the points from the different sources into a new measure. Any help would be appreciated! Thank you.

 

From Source "A"  From Source "B"  New Measure 
BuyerBase Points BuyerBonus Points BuyerTotal Points (Base+Bonus)
A5    A5
6 B3 B9
C4    C4
   D2 D2
E7 E2 E9
8    F8
1 ACCEPTED SOLUTION
v-fenling-msft
Community Support
Community Support

Thanks for az38's concern about this issue.

 

Hi, @guybrit 

I am glad to help you. 

 

According to the problem you described, first you need to connect Power BI to different data source and then open Power Query Editor:

vfenlingmsft_0-1729044005531.png

 


Select one of the tables and click Append Queries as New, then select the corresponding two tables and you will get a new table:

vfenlingmsft_1-1729044060109.png

 

vfenlingmsft_2-1729044091663.png

 

vfenlingmsft_3-1729044123031.png

 


Ctrl+click Base Points and Bonus Points, right click and select Replace value, replace null with 0:

vfenlingmsft_4-1729044188080.png

 

vfenlingmsft_5-1729044213404.png


Close&Reply.


New measure in the new table:

Total Points(Base + Bonus) =
SUMX ( AppendTable, AppendTable[Base Points] + AppendTable[Bonus Points] )

 

vfenlingmsft_6-1729044322042.png

 

 

 

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-fenling-msft
Community Support
Community Support

Thanks for az38's concern about this issue.

 

Hi, @guybrit 

I am glad to help you. 

 

According to the problem you described, first you need to connect Power BI to different data source and then open Power Query Editor:

vfenlingmsft_0-1729044005531.png

 


Select one of the tables and click Append Queries as New, then select the corresponding two tables and you will get a new table:

vfenlingmsft_1-1729044060109.png

 

vfenlingmsft_2-1729044091663.png

 

vfenlingmsft_3-1729044123031.png

 


Ctrl+click Base Points and Bonus Points, right click and select Replace value, replace null with 0:

vfenlingmsft_4-1729044188080.png

 

vfenlingmsft_5-1729044213404.png


Close&Reply.


New measure in the new table:

Total Points(Base + Bonus) =
SUMX ( AppendTable, AppendTable[Base Points] + AppendTable[Bonus Points] )

 

vfenlingmsft_6-1729044322042.png

 

 

 

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

az38
Community Champion
Community Champion

hi @guybrit 

you should create first dimension table Buyers that consists only of Buyer names from both columns. distinct from union of two tables.

then connect this dimension table to 2 data sources

 

it is difficult to provide more detailed answer without your data model details


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.