View My Drafts
_Count Purchased in CouponID =
COUNTROWS( 'Table' ),
TREATAS(VALUES('Table'[PurchasedCouponId]), 'Table'[couponId] )
It creates a list of [PurchasedCouponId] values, honouring any filters you have in place, uses that to filter the [CouponId] column and counts the number of rows in the resulting table.