Forum Discussion
Create Measure for Distinct Count of a column based on criteria from another column
- 8 years ago
In your scenario, when Event Type = X you want to return a distinct count of email IDs. Right?
Then you can try following DAX expression for a measure:
Count Event Type X = CALCULATE ( DISTINCTCOUNT ( Table4[Email ID] ), FILTER ( ALL ( Table4 ), Table4[Event Type] = "X" ) )Result shows like:
If above doesn't satisfy your requirement, please kindly share us more information like your source table structure and some sample data with corresponding desired result. So that we can make proper tests.
Thanks,
Xi Jin.
In your scenario, when Event Type = X you want to return a distinct count of email IDs. Right?
Then you can try following DAX expression for a measure:
Count Event Type X =
CALCULATE (
DISTINCTCOUNT ( Table4[Email ID] ),
FILTER ( ALL ( Table4 ), Table4[Event Type] = "X" )
)Result shows like:
If above doesn't satisfy your requirement, please kindly share us more information like your source table structure and some sample data with corresponding desired result. So that we can make proper tests.
Thanks,
Xi Jin.
- at0kun8 years agoRegular Visitor
Thanks Xi Jin, that did the trick!
- Anonymous6 years agoNot applicable
If I needed to add and additional Column criteria what would that look like?