Forum Discussion
Anonymous
3 years agoNot applicable
Customer Distinct Count with Multiple Conditions
Hi Experts, Need your help to calculate distinct count of my customers by "Customer code" where SalesQty sum of basepack code "6A43B3A48TV170301" & "6A43B3A48TV170303" is equal or greater than 8. ...
Anonymous
3 years agoNot applicable
Hi ERD, I saw you solved similar problem! Can you pls help me out with this one?
ERD
Community Champion
3 years agoHello Anonymous ,
Don't know if you still need some help, but you can try this measure:
YourMeasure =
VAR t_with_b_code =
CALCULATETABLE (
CustomerSales,
CustomerSales[Basepack Code] IN { "6A43B3A48TV170301", "6A43B3A48TV170303" }
)
VAR rows_amt = COUNTROWS ( t_with_b_code )
RETURN
SUMX ( FILTER ( t_with_b_code, rows_amt = 2 ), [SalesQty] )