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) ) )
johnt75
Super User
4 years agoYou 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) ) )