Forum Discussion
Anonymous
4 years agoNot applicable
Distinct count based on filtered columns in another table
Hi, I need help with following scenario: There are two tables AA and BB that have customer IDs in column "contact_id" and "id" respectively. I need the distinct count of contact_id from Tabl...
- 4 years ago
You could create a measure like
Num delivered & consent = var delivered = CALCULATETABLE( VALUES(AA[contact_id]), AA[status] = "delivered") var consent = CALCULATETABLE( VALUES(BB[id]), BB[consent] = TRUE()) return COUNTROWS( DISTINCT( INTERSECT( delivered, consent) ) )
amitchandak
Super User
4 years agoAnonymous , if these tables are joined with each other then
calculate(count(AA[contact_id ]), filter(AA, [status] = "delivered", filter(BB, [Consent] = TRUE () ) )