Forum Discussion
baneworth
4 years agoHelper III
Count related table (same ID occurring both tables)
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! ...
- Anonymous4 years ago
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()))
Anonymous
4 years agoNot applicable
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()))