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 )
johnt75
3 years agoSuper User
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
Thanks a lot, that was it!
I do know too little about the basic mechanism in Power BI, think I'll have to attend a class. Thanks again!