Forum Discussion

dgdgdg122db's avatar
dgdgdg122db
Helper II
4 years ago
Solved

sum each Distinct counts base on slicer

Hello, 

I have a measure that calculates the distinct count of customers 

CALCULATE(DISTINCTCOUNT(Orders[CustomerID]))

 

In my report, there is also a Segment filter ( Segment X,Y,Z) , and customers can belong to multiple Segments. 

The segment is from a segment table, consists of a customer ID column and a Segment column, customer ID column have duplicates. if

I want to return double-counted results: for example:

when one segment is selected, then return distinct count of that segment,

but when multiple segments are selected, I want to return the sum of the distinct count of customers in the selected segments 

3 Replies