I have a data set (one table) with lots of repeating values, but I need to define order types based on this data. To classify the order types, I need to get the distinct counts from three columns for each order. The order types will be Simple and Complex. So, I want to count the number of orders that have a distinct count of 1 from columns [destid] and [groupid]. Complex orders will have many groups and destinatons.
Since I want to do this for each order, my thinking was to count the number of unique orders with the additional criteria of having < 2 distinct for each of the other columns.
I'm not understanding how to embed the other distinct counts to qualify the orders. Any help is appreciated.
This measure doesn't work, but it's what I have so far:
Simple Order Types =
VAR SimpleOrderCount =
CALCULATE(
DISTINCTCOUNT(orderTypeData[orderid])
(DISTINCTCOUNT(orderTypeData[groupid] < 2 && DISTINCTCOUNT(orderTypeData[destid] < 2 && DISTINCTCOUNT(orderTypeData[adid] < 2)))
Return
SimpleOrderCount