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
avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)