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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
YerlaSDU
Helper I
Helper I

Compare 2 columns and get same items with total

Hi Folks,

 

I have a 2 columns from 2 different tables and need to get same items from both and sum of them

As filter, I need to add conditions, where code are same, but CodeName is little different

YerlaSDU_0-1666943267846.png

 

How can I realize it?

 

4 REPLIES 4
chilichill
New Member

Hi,
are the first 4 letters unique for each Code Name and identical in both tables? And what does the connection between the tables look like?

@chilichill 

 

Code  4 letters is same for both, but codename may be different for the same Code. Connection is Many to One

Maybe try something like:

chilichill_0-1666946884726.png

Measure = 
VAR CodeTab1 = LEFT(MAX(Table1[Code Name]), 4)
VAR CodeTab2 = LEFT(MAX(Table2[Code Name]), 4)
RETURN
if(CodeTab1 = CodeTab2, SUM(Table1[Value]) + SUM(Table2[Value]), BLANK())

it always shows blank

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors
Top Kudoed Authors