Forum Discussion
jmkvalsund
Helper III
3 years agoUsing measure in a DAX filter does not work
Im trying to use a measure in a DAX filter to count the numbers of customers for each Key Account Manager (KAM) at a given date, but it does not seem to work. My measure is calculated like this, a...
- 3 years ago
Does it work if you store the result of the measure in a variable ?
M_NumberOfCustomersTwoMonthsAgo = VAR ReferenceDate = [M_StartDate2MonthsInterval] RETURN CALCULATE ( DISTINCTCOUNT ( 'Sales'[CustomerID] ), 'Sales'[KAM_email] = "[email protected]", 'Sales'[DateID] = ReferenceDate )
jmkvalsund
Helper III
3 years agoI tried your solution, but it didn't change anytning. And as far as I can see, the only difference is that the FILTER statement is written explicitly instead of being implisitt in the CALCULATE statement.
M_NumberOfCustomersTwoMonthsAgo is still (Blank) when using M_STartDate2MonthsInterval as value for criteria.
johnt75
Super User
3 years agoAre you certain that you have sales on the exact date in question ?