Forum Discussion
bml123
4 years agoPost Patron
Distinct count by category
Hi, I have a Clients table with client details Clients Id Name DOB Country 1 Uk 2 USA 3 UK and another products table Product Id Product Type Cl...
- Anonymous4 years ago
Hi bml123 ,
Please check this measure.
Measure = VAR ids = CALCULATETABLE ( VALUES ( products[Client Id] ), FILTER ( ALLSELECTED ( products ), products[Product Type] = SELECTEDVALUE ( products[Product Type] ) ) ) RETURN CALCULATE ( DISTINCTCOUNT ( Clients[Country] ), FILTER ( ALLSELECTED ( Clients ), Clients[Clients Id] IN ids ) )Best Regards,
Jay
Anonymous
4 years agoNot applicable
Hi bml123 ,
Please check this measure.
Measure =
VAR ids =
CALCULATETABLE (
VALUES ( products[Client Id] ),
FILTER (
ALLSELECTED ( products ),
products[Product Type] = SELECTEDVALUE ( products[Product Type] )
)
)
RETURN
CALCULATE (
DISTINCTCOUNT ( Clients[Country] ),
FILTER ( ALLSELECTED ( Clients ), Clients[Clients Id] IN ids )
)
Best Regards,
Jay