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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors