Forum Discussion
jmkvalsund
3 years agoHelper III
Using 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
3 years agoHelper III
Yes, because if I assign M_STartDate2MonthsInterval to a card it shows 20221130, and if I then replace <'Sales'[DateID] = [M_StartDate2MonthsInterval]> with <'Sales'[DateID] = 20221130> I get 397 customers. So there are data, but something about the use of the measure in the filter screws things up.