This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreGet Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.
Dear All,
i was checking for same issues, since related table questions came up a lot but couldnt find something applicable to mine.
So if you could take a look, that would be very helpful!
I have 2 tables with Product ID's.
One is coming from SAP auto created (Main Table) and the other one is manually selected ID's by program which are exempted (based on the auto created ID's).
My issue now is, how do i create the DAX to only count ID's from 1st table if they are not matching ID's from 2nd.
Best regards
Matthias
Solved! Go to Solution.
Hi @baneworth
It is better to provide some sample data in a format which people can copy, you have distinct values in ID column in both tables? When you said matching, is there a rule or simple they are the same? You only need to count how many IDs, distinct count? In general, you can do something like this
TEST =
VAR T1= ADDCOLUMNS(VALUES(Table1[ID]),"CHECK",CONTAINS(VALUES(Table2[ID]),Table2[ID],Table1[ID]))
RETURN
COUNTROWS(FILTER(T1,[CHECK]=FALSE()))
Hi @baneworth ,
Based on your description, do you want to count the mismatched ID when the ID in Table 1 do not match the selected ID?
If I understand correctly, please create the following measure:
Measure = CALCULATE(DISTINCTCOUNT('Table'[ID]),FILTER(ALL('Table'),NOT('Table'[ID] in VALUES('Table (2)'[ID]))))
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @baneworth
It is better to provide some sample data in a format which people can copy, you have distinct values in ID column in both tables? When you said matching, is there a rule or simple they are the same? You only need to count how many IDs, distinct count? In general, you can do something like this
TEST =
VAR T1= ADDCOLUMNS(VALUES(Table1[ID]),"CHECK",CONTAINS(VALUES(Table2[ID]),Table2[ID],Table1[ID]))
RETURN
COUNTROWS(FILTER(T1,[CHECK]=FALSE()))
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 23 | |
| 21 | |
| 21 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 55 | |
| 53 | |
| 45 | |
| 26 | |
| 24 |