Forum Discussion

jmkvalsund's avatar
jmkvalsund
Helper III
3 years ago
Solved

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...
  • johnt75's avatar
    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
        )