Forum Discussion
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
- Ashish_MathurSuper User
Hi,
Why is there no relationship?
- v-huizhn-msftMicrosoft 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