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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
haassiej
Helper I
Helper I

Dax sum / filter when match

Hi everyone,

 

I have a question regarding a DAX formula. I want to run a calculation when values from 2 different tables, without relationship, match.

 

In Table A, the column used is Code-A.
In Table B, the column used is Serial Code

 

What I have so far:

 

 

 

Measurename = 
CALCULATE (
         SUM ('Fact'[Balance]);
         FILTER ('Table B'; [Serial-Code] = "1234")
     )

 

 

In conclusion, I would like something as follows:

 

 

 

Measurename = 
CALCULATE (
         SUM ('Fact'[Balance]);
         FILTER ('Table B'; [Serial-Code] = 'Table A'; [Code-A])
     )

 


Unfortunately, I have not managed to get this working. I hope somebody can help me with this.

 

Again: The tables do not have a relationship / join.

2 REPLIES 2
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @haassiej,

As the @Ashish_Mathur posted, why don't you create a relationship between the tables? You can create a relationship between TableA and TableB using the Code-A and Serial Code. More details, please review this article: Create and manage relationships in Power BI Desktop.

There is another table "fact"? Could you please share more details for further analysis?

Best Regards,
Angelia

Ashish_Mathur
Super User
Super User

Hi,

 

Why is there no relationship?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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