I am trying to use the DAX query below to get the distinct daily count of customerID and filter out only when a stock was taken by the customer.
Distinct CID =
var _table =
SUMMARIZE(
'Secondary Meetings',
'Secondary Meetings'[Createddate].[Day],
"Distinct", DISTINCTCOUNT('Secondary Meetings'[CustomerID]),
"Stock Take",
FILTER(
'Secondary Meetings',
'Secondary Meetings'[StockTake]="Yes"
)
return SUMX(_table,[Distinct])
When I try the above DAX function I get this error below:
The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.