The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
To simplify my data, here's an example - my data is different and something I can't share:
PersonID | Product |
1 | X |
1 | Y |
2 | X |
3 | X |
3 | Y |
4 | Y |
What I'm interested in is getting count of how many people choose both X and Y - so above it would only count person ID 1 and 3.
I'm having trouble making the measure only count specific combinations of products.
Solved! Go to Solution.
@Sperling , Try a measure like
countx(filter(summarize(Table, Table[PersonID]
, "_cnt", calculate(distinctCOUNT(Table[Product]), filter(Table, Table[Product] in {"X", "Y"})))
, [_cnt]=2),[PersonID])
Just for fun, a showcase of powerful Excel worksheet formulas,
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
@Sperling , Try a measure like
countx(filter(summarize(Table, Table[PersonID]
, "_cnt", calculate(distinctCOUNT(Table[Product]), filter(Table, Table[Product] in {"X", "Y"})))
, [_cnt]=2),[PersonID])