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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
sid-poly
Helper I
Helper I

Relationship Causing Duplicates in Measure and Giving Incorrect Total

There are 3 Tables, Dim, Tab1, and Tab 2 with the relationship defined below,

 

sidpoly_0-1717656691509.png

 

Dim Table:

Key

A

B

C

D

 

Tab1:

KeyRefData
AABCD10
AABCD10
BIJKL20

 

Tab2:

KeyData
A10
C20
D40

 

The desired output is to get 

KeyRefData Tab1Data Tab2

A

ABCD2010

B

IJKL20 

C

  20

D

  40

 

Tried using the measure 

CALCULATE(SUMX(Tab2,Tab2[Data]), ALLSELECTED(Dim[Key]))
end up with duplicate values and Cross join of the table with the DIM giving
A
A
A
B
B
B
C
C
C
D
D
What is the reason behind the duplication and how to correct it?
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @sid-poly 

 

You can use the append feature in PowerQuery to implement your needs.

vjialongymsft_0-1717724872537.png

 

 

When you add the "ref" column to the table, the result can only be like this:

vjialongymsft_1-1717724964075.png

 

 

 

 

 

 

Best Regards,

Jayleny

 

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

1 REPLY 1
Anonymous
Not applicable

Hi @sid-poly 

 

You can use the append feature in PowerQuery to implement your needs.

vjialongymsft_0-1717724872537.png

 

 

When you add the "ref" column to the table, the result can only be like this:

vjialongymsft_1-1717724964075.png

 

 

 

 

 

 

Best Regards,

Jayleny

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.